From 904ee344987c8e422d53726d4804baec7935f1c5 Mon Sep 17 00:00:00 2001 From: Thibault Richy Date: Mon, 6 May 2019 09:42:26 +0200 Subject: [PATCH] Fix routes & get rid of middleware ProcessSpecificURL --- app/Http/Controllers/RedirectController.php | 25 ++++++++++++++++++ routes/web.php | 29 ++++++++++++++++++--- 2 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 app/Http/Controllers/RedirectController.php diff --git a/app/Http/Controllers/RedirectController.php b/app/Http/Controllers/RedirectController.php new file mode 100644 index 0000000..ca1b2ae --- /dev/null +++ b/app/Http/Controllers/RedirectController.php @@ -0,0 +1,25 @@ +basketid)){ + return redirect()->action('PanierController@showTemplate'); //$this->showTemplate($request); + } elseif (isset($request->hash)) { + return redirect()->action('MurController@show'); + } else { + abort(404); + } + } +} diff --git a/routes/web.php b/routes/web.php index 3ba58c6..e159d29 100644 --- a/routes/web.php +++ b/routes/web.php @@ -78,9 +78,32 @@ Route::group(['prefix' => 'bo', 'middleware' => ['auth', 'saveroute']], function // ---- Export Coupons Route::post('/exportCoupon', 'ExportController@export_coupons'); + + +// ----- Routes API ------ // +Route::get('/updatecontact', 'ContactController@updateContact'); + +Route::get('/delctrlcontact', 'MurController@deleteControlContact'); +Route::get('/mntdispocampagne', 'MurController@montantDispoCampagne'); +Route::get('/mntdispocontact', 'MurController@montantDispoContact'); + +Route::get('/updatebasket', 'PanierController@updateBasket'); +Route::get('/showbasket', 'PanierController@showBasket'); +Route::get('/imprime', 'PanierController@printPanierSelect'); +Route::get('/merci-panier', 'PanierController@getThanks'); + +Route::get('/getdetailcampaign', 'CampagneController@getDetail'); +Route::get('/getdiffctccampaign', 'CampagneController@getDiffCamp'); + +Route::get('/imprimer', 'MurController@printMur'); +Route::get('/merci', 'MurController@getThanks'); + +Route::get('/index', 'AjaxController@backToIndex'); + +Route::get('/', "RedirectController"); // ---- Routes spécifiques : API -Route::any('/{param?}', function ($param = null) { - return; -})->middleware(ProcessSpecificUrl::class); +// Route::any('/{param?}', function ($param = null) { +// return; +// })->middleware(ProcessSpecificUrl::class);