app->make('Litematrimony\Reference\Interfaces\VisitRepositoryInterface'); return $visitrepo->findorNew($visit); }); } if (Request::is('*/reference/shortlist/*')) { Route::bind('shortlist', function ($shortlist) { $shortlistrepo = $this->app->make('Litematrimony\Reference\Interfaces\ShortlistRepositoryInterface'); return $shortlistrepo->findorNew($shortlist); }); } if (Request::is('*/reference/request/*')) { Route::bind('request', function ($request) { $requestrepo = $this->app->make('Litematrimony\Reference\Interfaces\RequestRepositoryInterface'); return $requestrepo->findorNew($request); }); } } /** * 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'); }); } }