0

When I want to enter one page I defined earlier, it just shows error. More specifically - Route [/infos] not defined. (View: ...\resources\views\infos\create.blade.php). In my php artisan route:list, it shows that the route exists normally. This post is my last hope, bc I'm trying to figure this out for a couple of days.

web.php code block

Route::get('/infos/{worker}/create', 'WorkerController@info')->name('infos.create');

WorkerController code block

public function info($id) 
{
    $worker = Worker::find($id);
    return view('infos.create')->withWorker($worker);
}
  • Are you trying to call the route by that name inside the view? If you are trying to call `route('/infos')` then that is not valid, it would have to be `route('infos.create')`. – newUserName02 Dec 04 '18 at 21:35
  • Yes. That's it. I just lost the concentration somewhere and lost in these minor syntax problems. Thank you. You can post the comment as an answer and I will mark it :) – Haris Begic Dec 04 '18 at 21:49
  • That's ok, glad to help. Besides, there are already good answers to similar questions: https://stackoverflow.com/questions/28714675/laravel-5-route-not-defined-while-it-is – newUserName02 Dec 04 '18 at 21:53

0 Answers0