app->make('Survey\Organisation\Interfaces\FileRepositoryInterface'); return $filerepo->findorNew($file); }); } if (Request::is('*/organisation/hierarchy/*')) { Route::bind('hierarchy', function ($hierarchy) { $hierarchyrepo = $this->app->make('Survey\Organisation\Interfaces\HierarchyRepositoryInterface'); return $hierarchyrepo->findorNew($hierarchy); }); } if (Request::is('*/organisation/employee/*')) { Route::bind('employee', function ($employee) { $employeerepo = $this->app->make('Survey\Organisation\Interfaces\EmployeeRepositoryInterface'); return $employeerepo->findorNew($employee); }); } } /** * 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() { Route::group([ 'middleware' => 'web', 'namespace' => $this->namespace, ], function ($router) { require (__DIR__ . '/../../routes/web.php'); }); } }