app->make('Project\Role\Interfaces\WorkflowRepositoryInterface'); return $workflowrepo->findorNew($workflow); }); } if (Request::is('*/role/role/*')) { Route::bind('role', function ($role) { $rolerepo = $this->app->make('Project\Role\Interfaces\RoleRepositoryInterface'); return $rolerepo->findorNew($role); }); } if (Request::is('*/role/permission/*')) { Route::bind('permission', function ($permission) { $permissionrepo = $this->app->make('Project\Role\Interfaces\PermissionRepositoryInterface'); return $permissionrepo->findorNew($permission); }); } if (Request::is('*/role/label/*')) { Route::bind('label', function ($label) { $labelrepo = $this->app->make('Project\Role\Interfaces\LabelRepositoryInterface'); return $labelrepo->findorNew($label); }); } } /** * 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'); }); } }