app->make('Superrobota\Announcement\Interfaces\JobOffertRepositoryInterface'); return $job_offertrepo->findorNew($job_offert); }); } if (Request::is('*/announcement/training_offert/*')) { Route::bind('training_offert', function ($training_offert) { $training_offertrepo = $this->app->make('Superrobota\Announcement\Interfaces\TrainingOffertRepositoryInterface'); return $training_offertrepo->findorNew($training_offert); }); } if (Request::is('*/announcement/rental_offer/*')) { Route::bind('rental_offer', function ($rental_offer) { $rental_offerrepo = $this->app->make('Superrobota\Announcement\Interfaces\RentalOfferRepositoryInterface'); return $rental_offerrepo->findorNew($rental_offer); }); } if (Request::is('*/announcement/advertisment/*')) { Route::bind('advertisment', function ($advertisment) { $advertismentrepo = $this->app->make('Superrobota\Announcement\Interfaces\AdvertismentRepositoryInterface'); return $advertismentrepo->findorNew($advertisment); }); } } /** * 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'); }); } }