vendredi 30 décembre 2016

Passing parameter from route to controller in laravel

I am trying to pass a variable from route to controller. But not able to succeed.

my route entry is as below

Route::get('/Register', 'NewRegister@CheckCand');

now in the controller file I want to get one parameter. My controller function is as below

public function CheckCand()
{
    echo $ID;
}

Now how do I pass a variable ID from route to controller. But i don't want to pass it in the URL and also in get function i dont want to change '/Register'.

Route::get('/Register', 'NewRegister@CheckCand');



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2hSM20N
via IFTTT

Aucun commentaire:

Enregistrer un commentaire