lundi 7 mars 2016

pass value to route and then controller

this is my view

<a href="{{URL::route('audit_crawling')}}"class="clear active"> </a>

and i want to pass value to route, value is in $id variable

  {{URL::route('audit_crawling'.$id)}}

and i want to get this value here and pass to controller

Route::get('/dashboard',[
    'as'=>'audit_crawling',
    'uses'=>'ProjectController@audit_crawling'
]);

and this is my controller code

 function audit_crawling($id)
     {
     data=['id'=>$id];
    return view('user.project.dashboard',$data);
    }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire