app->make('B2buy\Service\Interfaces\ProviderRepositoryInterface'); return $providerrepo->findorNew($provider); }); } if (Request::is('*/service/booking/*')) { Route::bind('booking', function ($booking) { $bookingrepo = $this->app->make('B2buy\Service\Interfaces\BookingRepositoryInterface'); return $bookingrepo->findorNew($booking); }); } if (Request::is('*/service/quote/*')) { Route::bind('quote', function ($quote) { $quoterepo = $this->app->make('B2buy\Service\Interfaces\QuoteRepositoryInterface'); return $quoterepo->findorNew($quote); }); } if (Request::is('*/service/comment/*')) { Route::bind('comment', function ($comment) { $commentrepo = $this->app->make('B2buy\Service\Interfaces\CommentRepositoryInterface'); return $commentrepo->findorNew($comment); }); } if (Request::is('*/service/subscription/*')) { Route::bind('subscription', function ($subscription) { $subscriptionrepo = $this->app->make('B2buy\Service\Interfaces\SubscriptionRepositoryInterface'); return $subscriptionrepo->findorNew($subscription); }); } if (Request::is('*/service/provider_availability/*')) { Route::bind('provider_availability', function ($provider_availability) { $provider_availabilityrepo = $this->app->make('B2buy\Service\Interfaces\ProviderAvailabilityRepositoryInterface'); return $provider_availabilityrepo->findorNew($provider_availability); }); } if (Request::is('*/service/review/*')) { Route::bind('review', function ($review) { $reviewrepo = $this->app->make('B2buy\Service\Interfaces\ReviewRepositoryInterface'); return $reviewrepo->findorNew($review); }); } } /** * 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() { Route::group([ 'middleware' => 'web', 'namespace' => $this->namespace, ], function ($router) { require (__DIR__ . '/../../routes/web.php'); }); } /** * Define the "api" routes for the package. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::group([ 'middleware' => 'api', 'namespace' => $this->namespace, 'prefix' => 'api', ], function ($router) { require (__DIR__ . '/../../routes/api.php'); }); } }