app->make('Bixo\Company\Interfaces\CompaniesRepositoryInterface'); return $companiesrepo->findorNew($companies); }); } if (Request::is('*/company/offices/*')) { Route::bind('offices', function ($offices) { $officesrepo = $this->app->make('Bixo\Company\Interfaces\OfficesRepositoryInterface'); return $officesrepo->findorNew($offices); }); } if (Request::is('*/company/divisions/*')) { Route::bind('divisions', function ($divisions) { $divisionsrepo = $this->app->make('Bixo\Company\Interfaces\DivisionsRepositoryInterface'); return $divisionsrepo->findorNew($divisions); }); } if (Request::is('*/company/departments/*')) { Route::bind('departments', function ($departments) { $departmentsrepo = $this->app->make('Bixo\Company\Interfaces\DepartmentsRepositoryInterface'); return $departmentsrepo->findorNew($departments); }); } if (Request::is('*/company/benefits/*')) { Route::bind('benefits', function ($benefits) { $benefitsrepo = $this->app->make('Bixo\Company\Interfaces\BenefitsRepositoryInterface'); return $benefitsrepo->findorNew($benefits); }); } if (Request::is('*/company/subdivisions/*')) { Route::bind('subdivisions', function ($subdivisions) { $subdivisionsrepo = $this->app->make('Bixo\Company\Interfaces\SubdivisionsRepositoryInterface'); return $subdivisionsrepo->findorNew($subdivisions); }); } } /** * 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, ], 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, 'prefix' => 'api', ], function ($router) { require (__DIR__ . '/../../routes/api.php'); }); } }