app->make('Litepie\Services\Interfaces\ServiceRepositoryInterface'); return $servicerepo->findorNew($service); }); } if (Request::is('*/services/service_category/*')) { Route::bind('service_category', function ($service_category) { $service_categoryrepo = $this->app->make('Litepie\Services\Interfaces\ServiceCategoryRepositoryInterface'); return $service_categoryrepo->findorNew($service_category); }); } if (Request::is('*/services/service_review/*')) { Route::bind('service_review', function ($service_review) { $service_reviewrepo = $this->app->make('Litepie\Services\Interfaces\ServiceReviewRepositoryInterface'); return $service_reviewrepo->findorNew($service_review); }); } } /** * 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() { Route::group([ 'middleware' => 'web', 'namespace' => $this->namespace, ], function ($router) { require (__DIR__ . '/../../routes/web.php'); }); } }