Answer the question
In order to leave comments, you need to log in
How to correctly pass a parameter to a method (Laravel 5.3)?
route:
Route::get('films/form/{id}', '[email protected]');
class FilmsController extends Controller
{
public function getForm($id = null)
{
echo "True";
}
<h1>Фильмы <a href="{{ action('Backend\[email protected]') }}">Create></a></h1>
ErrorException in UrlGenerationException.php line 17:
Missing required parameters for [Route: ] [URI: admin-panel/films/form/{id}]. (View: /home/alexander/SosProjects/cinema.local/resources/views/backend/films/index.blade.php)
Answer the question
In order to leave comments, you need to log in
Route::get('films/form/{id?}', '[email protected]');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question