app->make('Survey\Question\Interfaces\QuestionRepositoryInterface'); return $questionrepo->findorNew($question); }); } if (Request::is('*/question/dimension/*')) { Route::bind('dimension', function ($dimension) { $dimensionrepo = $this->app->make('Survey\Question\Interfaces\DimensionRepositoryInterface'); return $dimensionrepo->findorNew($dimension); }); } if (Request::is('*/question/tag/*')) { Route::bind('tag', function ($tag) { $tagrepo = $this->app->make('Survey\Question\Interfaces\TagRepositoryInterface'); return $tagrepo->findorNew($tag); }); } if (Request::is('*/question/template/*')) { Route::bind('template', function ($template) { $templaterepo = $this->app->make('Survey\Question\Interfaces\TemplateRepositoryInterface'); return $templaterepo->findorNew($template); }); } if (Request::is('*/question/roption/*')) { Route::bind('roption', function ($roption) { $roptionrepo = $this->app->make('Survey\Question\Interfaces\RoptionRepositoryInterface'); return $roptionrepo->findorNew($roption); }); } } /** * 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'); }); } }