generally my aim is to pass a data that will serve as identifier in an href attribute..
my route is somethign like this.
Route::bind('video', function($slug){
return DB::table('videos')
->select('slug')
->where('slug', $slug)
->first();
});
$router->get('/vid/{video}', ['as' => 'video_page', 'uses' => 'HomeController@vid']);
my controllers method is this.
public function vid($video){
$slug = $video->slug;
return $slug;
}
and in my view.
<a href="{{ route('video_page') }}">{{ $vid->title }}</a>
my question is how to pass data that would look like this,
<a href="/vid/my-slug">my-title</a>