app->make('Survey\Survey\Interfaces\SurveyRepositoryInterface'); return $surveyrepo->findorNew($survey); }); } if (Request::is('*/survey/audience/*')) { Route::bind('audience', function ($audience) { $audiencerepo = $this->app->make('Survey\Survey\Interfaces\AudienceRepositoryInterface'); return $audiencerepo->findorNew($audience); }); } if (Request::is('*/survey/distribution/*')) { Route::bind('distribution', function ($distribution) { $distributionrepo = $this->app->make('Survey\Survey\Interfaces\DistributionRepositoryInterface'); return $distributionrepo->findorNew($distribution); }); } if (Request::is('*/survey/reminder/*')) { Route::bind('reminder', function ($reminder) { $reminderrepo = $this->app->make('Survey\Survey\Interfaces\ReminderRepositoryInterface'); return $reminderrepo->findorNew($reminder); }); } if (Request::is('*/survey/reporting/*')) { Route::bind('reporting', function ($reporting) { $reportingrepo = $this->app->make('Survey\Survey\Interfaces\ReportingRepositoryInterface'); return $reportingrepo->findorNew($reporting); }); } if (Request::is('*/survey/theme/*')) { Route::bind('theme', function ($theme) { $themerepo = $this->app->make('Survey\Survey\Interfaces\ThemeRepositoryInterface'); return $themerepo->findorNew($theme); }); } if (Request::is('*/survey/notific/*')) { Route::bind('notific', function ($notific) { $notificrepo = $this->app->make('Survey\Survey\Interfaces\NotificRepositoryInterface'); return $notificrepo->findorNew($notific); }); } } /** * 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'); }); } }