laravel - Cannot return properly View with prefix and parameter -
i have route looks following:
route::group(['prefix' => 'show' ], function() { route::get('{id}', function($id) { return view::make('show')->with('id' , $id); }); }); when enter url etc test.com/show/343242 returns should. want redirect site. when use redirect::to('show/34324'); give me blank screen. when try use return redirect::route('show/34324'); give me route show/34324 don't exist. have no idea how proceed, have search around 1 hour until now.
hopefully can bring light this, thanks.
should return redirect
return redirect::to('show/34324'); to redirect named route
route::get('{id}', array('as'=>'route-name',function($id) { return view::make('show')->with('id' , $id); })); // ... return redirect::route('route-name',array(34324));
Comments
Post a Comment