mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-26 06:57:58 +01:00
12 lines
204 B
PHP
12 lines
204 B
PHP
|
<?php
|
||
|
|
||
|
namespace Traits;
|
||
|
|
||
|
use Illuminate\Support\Str;
|
||
|
|
||
|
trait SlugTrait {
|
||
|
public function setTitleAttribute($value) {
|
||
|
$this->slug = Str::slug($value);
|
||
|
$this->attributes['title'] = $value;
|
||
|
}
|
||
|
}
|