After a lot of searching for google and not finding a solution to my problem, I decided to ask the wisdom of the internet:
These are my routes:
Route::get('/customers', 'CustomerController@index')
->name('customerIndex');
Route::get('/customers/create', 'CustomerController@create')
->name('customerCreate');
Route::post('/customers', 'CustomerController@store')
->name('customerStore');
Route::get('/customers/{customer}', 'CustomerController@show')
->name('customerShow');
Route::get('/customers/{customer}/edit', 'CustomerController@edit')
->name('customerEdit');
Route::put('/customers/{customer}', 'CustomerController@update')
->name('customerUpdate');
Route::delete('/customers/{customer}', 'CustomerController@destroy')
->name('customerDestroy');
Before I had:
Route::resource('customers', 'CustomerController');
The fact is that the route that goes to the show function does not do anything, any code that you put inside that function does not run.
The show function:
public function show($id)
{
dd("hola");
$customer = Customer::findOrFail($id);
return view('customers.show', compact('customer'));
}
Someone would know how to tell me why the dd ('hello') is not even executed; An important detail, on sight if it arrives, but not because I put it in the return of the function, because if I remove it, I can still see the view.
Thanks in advance.