app->make('Annie\Act\Interfaces\ActivityRepositoryInterface'); return $activityrepo->findorNew($activity); }); } if (Request::is('*/act/activity_activity_area/*')) { Route::bind('activity_activity_area', function ($activity_activity_area) { $activity_activity_arearepo = $this->app->make('Annie\Act\Interfaces\ActivityActivityAreaRepositoryInterface'); return $activity_activity_arearepo->findorNew($activity_activity_area); }); } if (Request::is('*/act/activity_area/*')) { Route::bind('activity_area', function ($activity_area) { $activity_arearepo = $this->app->make('Annie\Act\Interfaces\ActivityAreaRepositoryInterface'); return $activity_arearepo->findorNew($activity_area); }); } if (Request::is('*/act/activity_college/*')) { Route::bind('activity_college', function ($activity_college) { $activity_collegerepo = $this->app->make('Annie\Act\Interfaces\ActivityCollegeRepositoryInterface'); return $activity_collegerepo->findorNew($activity_college); }); } if (Request::is('*/act/activity_community/*')) { Route::bind('activity_community', function ($activity_community) { $activity_communityrepo = $this->app->make('Annie\Act\Interfaces\ActivityCommunityRepositoryInterface'); return $activity_communityrepo->findorNew($activity_community); }); } if (Request::is('*/act/activity_manager/*')) { Route::bind('activity_manager', function ($activity_manager) { $activity_managerrepo = $this->app->make('Annie\Act\Interfaces\ActivityManagerRepositoryInterface'); return $activity_managerrepo->findorNew($activity_manager); }); } if (Request::is('*/act/activity_metum/*')) { Route::bind('activity_metum', function ($activity_metum) { $activity_metumrepo = $this->app->make('Annie\Act\Interfaces\ActivityMetumRepositoryInterface'); return $activity_metumrepo->findorNew($activity_metum); }); } if (Request::is('*/act/activity_programme/*')) { Route::bind('activity_programme', function ($activity_programme) { $activity_programmerepo = $this->app->make('Annie\Act\Interfaces\ActivityProgrammeRepositoryInterface'); return $activity_programmerepo->findorNew($activity_programme); }); } if (Request::is('*/act/activity_project/*')) { Route::bind('activity_project', function ($activity_project) { $activity_projectrepo = $this->app->make('Annie\Act\Interfaces\ActivityProjectRepositoryInterface'); return $activity_projectrepo->findorNew($activity_project); }); } if (Request::is('*/act/activity_school/*')) { Route::bind('activity_school', function ($activity_school) { $activity_schoolrepo = $this->app->make('Annie\Act\Interfaces\ActivitySchoolRepositoryInterface'); return $activity_schoolrepo->findorNew($activity_school); }); } if (Request::is('*/act/activity_social_partner/*')) { Route::bind('activity_social_partner', function ($activity_social_partner) { $activity_social_partnerrepo = $this->app->make('Annie\Act\Interfaces\ActivitySocialPartnerRepositoryInterface'); return $activity_social_partnerrepo->findorNew($activity_social_partner); }); } if (Request::is('*/act/activity_work_area/*')) { Route::bind('activity_work_area', function ($activity_work_area) { $activity_work_arearepo = $this->app->make('Annie\Act\Interfaces\ActivityWorkAreaRepositoryInterface'); return $activity_work_arearepo->findorNew($activity_work_area); }); } if (Request::is('*/act/activity_log/*')) { Route::bind('activity_log', function ($activity_log) { $activity_logrepo = $this->app->make('Annie\Act\Interfaces\ActivityLogRepositoryInterface'); return $activity_logrepo->findorNew($activity_log); }); } } /** * Define the routes for the package. * * @return void */ public function map() { $this->mapWebRoutes(); $this->mapApiRoutes(); } /** * 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'); }); } /** * Define the "api" routes for the package. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { if(request()->segment(1) != 'api' && request()->segment(2) != 'api') { return; } Route::group([ 'middleware' => 'api', 'namespace' => $this->namespace, 'prefix' => trans_setlocale() . '/api', ], function ($router) { require (__DIR__ . '/../../routes/api.php'); }); } }