NOMGUY
1 year ago

Slug

Posted 1 year ago by NOMGUY

This is my blade file code:

<h2><a href="{{ route('posts.show',$post->id) }}">{{ $post->title }}</a></h2>

This is my show function:

public function show($id)
    {
        $post=Post::find($id);
        return view('posts.show')->with('post',$post);
    }

i am using Cviebrock laravel-sluggable. how to show slug url

Please sign in or create an account to participate in this conversation.