Iam making a tag system,when user click a certain link ,display all results related to it
In view i have a link like this
@foreach($productTags as $tags)
<a href="{{ action('Product\ProductController@searchTags', ['tags_id' => $tags->id]) }}" id="tags">{{$tags->tags}}</a>
@endforeach
Routes
Route::get('tags/{tags}','Product\ProductController@searchTags');
I want to get it in controller which is like this
public function searchTags($tags)
{
dd($request->get('tags_ids'));
$search = \DB::table('products')->select('tags','id')
->where('tags',$tags)->get();
return view('products.show.search',
compact('search'));
}
But iam getting null