mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-28 23:57:59 +01:00
Fix SlugTrait
This commit is contained in:
parent
39290f8204
commit
32e19fb4e5
2 changed files with 11 additions and 9 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App;
|
||||
|
||||
use App\Traits\SlugTrait;
|
||||
use Exception;
|
||||
use External;
|
||||
use getid3_writetags;
|
||||
|
@ -15,7 +16,6 @@ use Illuminate\Support\Facades\DB;
|
|||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\Str;
|
||||
use Traits\SlugTrait;
|
||||
|
||||
class Track extends Model
|
||||
{
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Traits;
|
||||
namespace App\Traits;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
trait SlugTrait {
|
||||
public function setTitleAttribute($value) {
|
||||
trait SlugTrait
|
||||
{
|
||||
public function setTitleAttribute($value)
|
||||
{
|
||||
$this->slug = Str::slug($value);
|
||||
$this->attributes['title'] = $value;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue