how it is done to declare a route? such as "site.domain / X / {id} / Y" ... because in my routes I have something similar
Route :: get ( '/X', function () {
$Var = Var::all();
return view ('pages.view') -> withVars ($var);
});
but it is only in the path "/X" I need access to another site after id as I said in the example
site.domain /X/{id}/Y
You can easily doing it with another route:
Route::get( '/X{id}/Y', function ($id) {
// do something
return view ('pages.view') -> withVars ($var);
});
this is how i fixed
Route::get('ph/{id}/informe', function ($id) {
$ph = Ph::find($id);
return view('ph.informe')->withphs($ph);
});