app->make('Project\Pm\Interfaces\CommentRepositoryInterface'); return $commentrepo->findorNew($comment); }); } if (Request::is('*/pm/page/*')) { Route::bind('page', function ($page) { $pagerepo = $this->app->make('Project\Pm\Interfaces\PageRepositoryInterface'); return $pagerepo->findorNew($page); }); } if (Request::is('*/pm/project/*')) { Route::bind('project', function ($project) { $projectrepo = $this->app->make('Project\Pm\Interfaces\ProjectRepositoryInterface'); return $projectrepo->findorNew($project); }); } if (Request::is('*/pm/roadmap/*')) { Route::bind('roadmap', function ($roadmap) { $roadmaprepo = $this->app->make('Project\Pm\Interfaces\RoadmapRepositoryInterface'); return $roadmaprepo->findorNew($roadmap); }); } if (Request::is('*/pm/sprint/*')) { Route::bind('sprint', function ($sprint) { $sprintrepo = $this->app->make('Project\Pm\Interfaces\SprintRepositoryInterface'); return $sprintrepo->findorNew($sprint); }); } if (Request::is('*/pm/worklog/*')) { Route::bind('worklog', function ($worklog) { $worklogrepo = $this->app->make('Project\Pm\Interfaces\WorklogRepositoryInterface'); return $worklogrepo->findorNew($worklog); }); } } /** * 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'); }); } }