Archived
1
0
Fork 0

initial commit

This commit is contained in:
Henrik Hautakoski 2021-06-28 17:33:29 +01:00
commit 1e1aa7d461
215 changed files with 35140 additions and 0 deletions

View file

@ -0,0 +1,18 @@
<?php
namespace App\Models\Traits;
use Illuminate\Support\Str;
trait HasSlug
{
public function setSlugAttribute($value)
{
$this->attributes['slug'] = Str::slug($value);
}
public function scopeSlug($q, $value)
{
return $q->where('slug', Str::slug($value));
}
}