app->make('\Nico\Nico\Interfaces\AssociationsRepositoryInterface'); return $associationsrepo->findorNew($associations); }); }if (Request::is('*/nico/bureau/*')) { Route::bind('bureau', function ($bureau) { $bureaurepo = $this->app->make('\Nico\Nico\Interfaces\BureauRepositoryInterface'); return $bureaurepo->findorNew($bureau); }); }if (Request::is('*/nico/commune/*')) { Route::bind('commune', function ($commune) { $communerepo = $this->app->make('\Nico\Nico\Interfaces\CommuneRepositoryInterface'); return $communerepo->findorNew($commune); }); }if (Request::is('*/nico/discipline/*')) { Route::bind('discipline', function ($discipline) { $disciplinerepo = $this->app->make('\Nico\Nico\Interfaces\DisciplineRepositoryInterface'); return $disciplinerepo->findorNew($discipline); }); } } /** * Define the routes for the package. * * @return void */ public function map() { $this->mapWebRoutes(); // $this->mapApiRoutes(); // } /** * Define the "web" routes for the package. * * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes() { Route::group([ 'middleware' => 'web', 'namespace' => $this->namespace, 'prefix' => trans_setlocale(), ], function ($router) { require (__DIR__ . '/../../../../routes/web.php'); }); } /** * Define the "api" routes for the package. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::group([ 'middleware' => 'api', 'namespace' => $this->namespace . '\Api', 'prefix' => trans_setlocale() . '/api', ], function ($router) { require (__DIR__ . '/../../../../routes/api.php'); }); } }