Skip to content

Commit

Permalink
Merge pull request #16 from Manoz/fix/15-laravel-6-support
Browse files Browse the repository at this point in the history
[Fix #15] Fix str_slug for Laravel 6 support
  • Loading branch information
Krato authored Oct 15, 2019
2 parents 113e053 + 2f56856 commit 320e018
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Models/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Infinety\MenuBuilder\Http\Models;

use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Infinety\MenuBuilder\Http\Models\MenuItems;
Expand All @@ -26,7 +27,7 @@ public static function boot()
parent::boot();

static::saving(function ($model) {
$model->slug = str_slug($model->name);
$model->slug = Str::slug($model->name);
});
}

Expand Down

0 comments on commit 320e018

Please sign in to comment.