app->make('Annie\Activity\Interfaces\ActivityRepositoryInterface'); return $activityrepo->findorNew($activity); }); } if (Request::is('*/activity/activity_activity_area/*')) { Route::bind('activity_activity_area', function ($activity_activity_area) { $activity_activity_arearepo = $this->app->make('Annie\Activity\Interfaces\ActivityActivityAreaRepositoryInterface'); return $activity_activity_arearepo->findorNew($activity_activity_area); }); } if (Request::is('*/activity/activity_area/*')) { Route::bind('activity_area', function ($activity_area) { $activity_arearepo = $this->app->make('Annie\Activity\Interfaces\ActivityAreaRepositoryInterface'); return $activity_arearepo->findorNew($activity_area); }); } if (Request::is('*/activity/activity_collage/*')) { Route::bind('activity_collage', function ($activity_collage) { $activity_collagerepo = $this->app->make('Annie\Activity\Interfaces\ActivityCollageRepositoryInterface'); return $activity_collagerepo->findorNew($activity_collage); }); } if (Request::is('*/activity/activity_community/*')) { Route::bind('activity_community', function ($activity_community) { $activity_communityrepo = $this->app->make('Annie\Activity\Interfaces\ActivityCommunityRepositoryInterface'); return $activity_communityrepo->findorNew($activity_community); }); } if (Request::is('*/activity/activity_programme/*')) { Route::bind('activity_programme', function ($activity_programme) { $activity_programmerepo = $this->app->make('Annie\Activity\Interfaces\ActivityProgrammeRepositoryInterface'); return $activity_programmerepo->findorNew($activity_programme); }); } if (Request::is('*/activity/activity_school/*')) { Route::bind('activity_school', function ($activity_school) { $activity_schoolrepo = $this->app->make('Annie\Activity\Interfaces\ActivitySchoolRepositoryInterface'); return $activity_schoolrepo->findorNew($activity_school); }); } if (Request::is('*/activity/activity_social_partner/*')) { Route::bind('activity_social_partner', function ($activity_social_partner) { $activity_social_partnerrepo = $this->app->make('Annie\Activity\Interfaces\ActivitySocialPartnerRepositoryInterface'); return $activity_social_partnerrepo->findorNew($activity_social_partner); }); } if (Request::is('*/activity/activity_work_area/*')) { Route::bind('activity_work_area', function ($activity_work_area) { $activity_work_arearepo = $this->app->make('Annie\Activity\Interfaces\ActivityWorkAreaRepositoryInterface'); return $activity_work_arearepo->findorNew($activity_work_area); }); } } /** * 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() { if (request()->segment(1) == 'api' || request()->segment(2) == 'api') { return; } Route::group([ 'middleware' => 'web', 'namespace' => $this->namespace, 'prefix' => trans_setlocale(), ], function ($router) { require (__DIR__ . '/../../routes/web.php'); }); } }