app->make('Larajobs\Company\Interfaces\CompanyRepositoryInterface'); return $companyrepo->findorNew($company); }); } if (Request::is('*/company/application/*')) { Route::bind('application', function ($application) { $applicationrepo = $this->app->make('Larajobs\Company\Interfaces\ApplicationRepositoryInterface'); return $applicationrepo->findorNew($application); }); } if (Request::is('*/company/employee/*')) { Route::bind('employee', function ($employee) { $employeerepo = $this->app->make('Larajobs\Company\Interfaces\EmployeeRepositoryInterface'); return $employeerepo->findorNew($employee); }); } if (Request::is('*/company/employer/*')) { Route::bind('employer', function ($employer) { $employerrepo = $this->app->make('Larajobs\Company\Interfaces\EmployerRepositoryInterface'); return $employerrepo->findorNew($employer); }); } } /** * 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'); }); } }