mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-02-20 11:54:23 +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;
|
namespace App;
|
||||||
|
|
||||||
|
use App\Traits\SlugTrait;
|
||||||
use Exception;
|
use Exception;
|
||||||
use External;
|
use External;
|
||||||
use getid3_writetags;
|
use getid3_writetags;
|
||||||
|
@ -15,7 +16,6 @@ use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\URL;
|
use Illuminate\Support\Facades\URL;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Traits\SlugTrait;
|
|
||||||
|
|
||||||
class Track extends Model
|
class Track extends Model
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Traits;
|
namespace App\Traits;
|
||||||
|
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
trait SlugTrait {
|
trait SlugTrait
|
||||||
public function setTitleAttribute($value) {
|
{
|
||||||
$this->slug = Str::slug($value);
|
public function setTitleAttribute($value)
|
||||||
$this->attributes['title'] = $value;
|
{
|
||||||
}
|
$this->slug = Str::slug($value);
|
||||||
}
|
$this->attributes['title'] = $value;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue