How to use Illuminate\Support\Str::slug in my Laravel 5 app?

后端 未结 6 973
孤独总比滥情好
孤独总比滥情好 2021-01-03 22:46

I\'m doing the following in the

public function boot(DispatcherContract $events)
{
    parent::boot($events);

    // set Tag slug
    Tag::saving(function(         


        
6条回答
  •  情书的邮戳
    2021-01-03 23:27

    Edit: As samiles pointed out, str_slug($text) has been removed in Laravel 6.0.

    In Laravel 5 you can use str_slug($text) directly. You no longer have to use the Facade.

    http://laravel.com/docs/5.1/helpers#method-str-slug

提交回复
热议问题