app->make('Annie\Evnt\Interfaces\EventRepositoryInterface'); return $eventrepo->findorNew($event); }); } if (Request::is('*/evnt/event_comment/*')) { Route::bind('event_comment', function ($event_comment) { $event_commentrepo = $this->app->make('Annie\Evnt\Interfaces\EventCommentRepositoryInterface'); return $event_commentrepo->findorNew($event_comment); }); } if (Request::is('*/evnt/event_community/*')) { Route::bind('event_community', function ($event_community) { $event_communityrepo = $this->app->make('Annie\Evnt\Interfaces\EventCommunityRepositoryInterface'); return $event_communityrepo->findorNew($event_community); }); } if (Request::is('*/evnt/event_invitation/*')) { Route::bind('event_invitation', function ($event_invitation) { $event_invitationrepo = $this->app->make('Annie\Evnt\Interfaces\EventInvitationRepositoryInterface'); return $event_invitationrepo->findorNew($event_invitation); }); } if (Request::is('*/evnt/event_like/*')) { Route::bind('event_like', function ($event_like) { $event_likerepo = $this->app->make('Annie\Evnt\Interfaces\EventLikeRepositoryInterface'); return $event_likerepo->findorNew($event_like); }); } if (Request::is('*/evnt/event_manager/*')) { Route::bind('event_manager', function ($event_manager) { $event_managerrepo = $this->app->make('Annie\Evnt\Interfaces\EventManagerRepositoryInterface'); return $event_managerrepo->findorNew($event_manager); }); } if (Request::is('*/evnt/event_school/*')) { Route::bind('event_school', function ($event_school) { $event_schoolrepo = $this->app->make('Annie\Evnt\Interfaces\EventSchoolRepositoryInterface'); return $event_schoolrepo->findorNew($event_school); }); } if (Request::is('*/evnt/event_project/*')) { Route::bind('event_project', function ($event_project) { $event_projectrepo = $this->app->make('Annie\Evnt\Interfaces\EventProjectRepositoryInterface'); return $event_projectrepo->findorNew($event_project); }); } if (Request::is('*/evnt/event_setting/*')) { Route::bind('event_setting', function ($event_setting) { $event_settingrepo = $this->app->make('Annie\Evnt\Interfaces\EventSettingRepositoryInterface'); return $event_settingrepo->findorNew($event_setting); }); } if (Request::is('*/evnt/event_social_partner/*')) { Route::bind('event_social_partner', function ($event_social_partner) { $event_social_partnerrepo = $this->app->make('Annie\Evnt\Interfaces\EventSocialPartnerRepositoryInterface'); return $event_social_partnerrepo->findorNew($event_social_partner); }); } if (Request::is('*/evnt/event_college/*')) { Route::bind('event_college', function ($event_college) { $event_collegerepo = $this->app->make('Annie\Evnt\Interfaces\EventCollegeRepositoryInterface'); return $event_collegerepo->findorNew($event_college); }); } } /** * 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'); }); } }