Fix routes & get rid of middleware ProcessSpecificURL
This commit is contained in:
parent
9ba568c00c
commit
904ee34498
2 changed files with 51 additions and 3 deletions
25
app/Http/Controllers/RedirectController.php
Normal file
25
app/Http/Controllers/RedirectController.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RedirectController extends Controller
|
||||
{
|
||||
/**
|
||||
* Handle the incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function __invoke(Request $request)
|
||||
{
|
||||
if(isset($request->basketid)){
|
||||
return redirect()->action('PanierController@showTemplate'); //$this->showTemplate($request);
|
||||
} elseif (isset($request->hash)) {
|
||||
return redirect()->action('MurController@show');
|
||||
} else {
|
||||
abort(404);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue