I am new to Laravel and want to redirect to another view using button.On clicking button I want to redirect to particular route function ansd then to controller.But I am making some mistake.I did what they showed online but couldnt rectify.Following is my code.
Controller:
class MyController extends BaseController{
function fromSub(){
return view('from');
}
}
Route: Route::get('from',array('uses'=>'MyController@fromSub' , 'as' => 'from'));
View:
<html>
<body>
<button type="button" onclick="window.location=''">BUTTON</button>
</body>
</html>
Thanks in advance.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire