I have difficults to create a supplementing Resource in a controller laravel and insert it in the web.php for the routing.
I would to implement a search functions, in an Articles controller .Beyond the authomatic generated function like (index, show...) i have created another one:
public function search($title){ $articles = Article::findOrFail($title); return $articles; }
And I have added it in the web.php for the routing:
Route::resource('articles/{title}', 'ArticleController@search'); When I try to test this search, it doesn't work. All the implicit controller go well, I have problem only with this selfmade function.
How can I solve this issue?
thanks
search.