samedi 27 janvier 2018

Put if conditions in route laravel

I am very new in laravel.I have following to routes and I need to check the condition if the user already exists in db then call different controller, besides I want both of these actions on a single html form with single submit button that already generates the form to save new user using laravel blade engine. What action do I need to specify in form. P.S the form has only one button.

Route::group(['prefix'=> 'save'], function(){
Route::get('/customer', [
    'uses' => 'CustomerController@SaveCustomer',
    'as' => 'save.customer'
    ]);

Route::get('/order',[
    'uses'=> 'OrderController@PlaceOrder',
    'as' => 'save.order'

]);



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

Aucun commentaire:

Enregistrer un commentaire