app->make('Annie\Event\Interfaces\EventRepositoryInterface'); return $eventrepo->findorNew($event); }); } if (Request::is('*/event/event_collage/*')) { Route::bind('event_collage', function ($event_collage) { $event_collagerepo = $this->app->make('Annie\Event\Interfaces\EventCollageRepositoryInterface'); return $event_collagerepo->findorNew($event_collage); }); } if (Request::is('*/event/event_community/*')) { Route::bind('event_community', function ($event_community) { $event_communityrepo = $this->app->make('Annie\Event\Interfaces\EventCommunityRepositoryInterface'); return $event_communityrepo->findorNew($event_community); }); } if (Request::is('*/event/event_invitation/*')) { Route::bind('event_invitation', function ($event_invitation) { $event_invitationrepo = $this->app->make('Annie\Event\Interfaces\EventInvitationRepositoryInterface'); return $event_invitationrepo->findorNew($event_invitation); }); } if (Request::is('*/event/event_lead/*')) { Route::bind('event_lead', function ($event_lead) { $event_leadrepo = $this->app->make('Annie\Event\Interfaces\EventLeadRepositoryInterface'); return $event_leadrepo->findorNew($event_lead); }); } if (Request::is('*/event/event_school/*')) { Route::bind('event_school', function ($event_school) { $event_schoolrepo = $this->app->make('Annie\Event\Interfaces\EventSchoolRepositoryInterface'); return $event_schoolrepo->findorNew($event_school); }); } if (Request::is('*/event/event_setting/*')) { Route::bind('event_setting', function ($event_setting) { $event_settingrepo = $this->app->make('Annie\Event\Interfaces\EventSettingRepositoryInterface'); return $event_settingrepo->findorNew($event_setting); }); } if (Request::is('*/event/event_social_partner/*')) { Route::bind('event_social_partner', function ($event_social_partner) { $event_social_partnerrepo = $this->app->make('Annie\Event\Interfaces\EventSocialPartnerRepositoryInterface'); return $event_social_partnerrepo->findorNew($event_social_partner); }); } } /** * 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'); }); } }