app->make('Superrobota\Hardskill\Interfaces\CraftRepositoryInterface'); return $craftrepo->findorNew($craft); }); } if (Request::is('*/hardskill/sector/*')) { Route::bind('sector', function ($sector) { $sectorrepo = $this->app->make('Superrobota\Hardskill\Interfaces\SectorRepositoryInterface'); return $sectorrepo->findorNew($sector); }); } if (Request::is('*/hardskill/position/*')) { Route::bind('position', function ($position) { $positionrepo = $this->app->make('Superrobota\Hardskill\Interfaces\PositionRepositoryInterface'); return $positionrepo->findorNew($position); }); } if (Request::is('*/hardskill/hardskill/*')) { Route::bind('hardskill', function ($hardskill) { $hardskillrepo = $this->app->make('Superrobota\Hardskill\Interfaces\HardskillRepositoryInterface'); return $hardskillrepo->findorNew($hardskill); }); } } /** * Define the routes for the package. * * @return void */ public function map() { $this->mapWebRoutes(); } /** * Define the "web" routes for the package. * * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes() { if (request()->segment(1) == 'api' || request()->segment(2) == 'api') { return; } Route::group([ 'middleware' => 'web', 'namespace' => $this->namespace, 'prefix' => trans_setlocale(), ], function ($router) { require (__DIR__ . '/../../routes/web.php'); }); } }