orWhere('slug', $value)->where('status', true)->firstOrFail(); }); Route::bind('engagement', function ($value) { return Engagement::where('id', $value)->firstOrFail(); }); Route::bind('product', function ($value) { return Products::where('id', $value)->orWhere('slug', $value)->firstOrFail(); }); Route::bind('range', function ($value) { return Ranges::where('id', $value)->orWhere('slug', $value)->firstOrFail(); }); Route::bind('moment', function ($value) { return Moments::where('id', $value)->orWhere('slug', $value)->firstOrFail(); }); Route::bind('slugRange', function ($value) { return Ranges::where('slug', $value)->where('status', true)->firstOrFail(); }); Route::bind('slugConsumptionTime', function ($value) { return ConsumptionTimes::where('slug', $value)->where('status', true)->firstOrFail(); }); Route::bind('slugMeatType', function ($value) { return MeatTypes::where('slug', $value)->where('status', true)->firstOrFail(); }); Route::bind('consumptiontime', function ($value) { return ConsumptionTimes::where('id', $value)->orWhere('slug', $value)->firstOrFail(); }); Route::bind('meattype', function ($value) { return MeatTypes::where('id', $value)->orWhere('slug', $value)->firstOrFail(); }); Route::bind('meat_type', function ($value) { return MeatTypes::where('id', $value)->orWhere('slug', $value)->firstOrFail(); }); Route::bind('ocbbreeder', function ($value) { return OCBBreeder::where('id', $value)->orWhere('slug', $value)->firstOrFail(); }); Route::bind('ad', function ($value) { return Ads::where('id', $value)->firstOrFail(); }); Route::bind('homeslider', function ($value) { return HomeSliderPictures::where('id', $value)->firstOrFail(); }); Route::bind('newsslider', function ($value) { return NewsSliderPictures::where('id', $value)->firstOrFail(); }); Route::bind('productslider', function ($value) { return ProductSliderPictures::where('id', $value)->firstOrFail(); }); Route::bind('recipe', function ($value) { return Recipes::where('id', $value)->orWhere('slug', $value)->firstOrFail(); }); Route::bind('balanced_menu', function ($value) { return BalancedMenus::where('id', $value)->firstOrFail(); }); Route::bind('article', function ($value) { return Articles::where('id', $value)->orWhere('slug', $value)->firstOrFail(); }); Route::bind('faq_question', function ($value) { return FaqQuestions::where('id', $value)->firstOrFail(); }); Route::bind('breederportrait', function ($value) { return BreederPortrait::where('id', $value)->firstOrFail(); }); Route::bind('ocb', function ($value) { return OCBContent::where('id', $value)->firstOrFail(); }); parent::boot(); } /** * Define the routes for the application. * * @return void */ public function map() { $this->mapApiRoutes(); $this->mapWebRoutes(); // } /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes() { Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); } /** * Define the "api" routes for the application. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::prefix('api') ->middleware('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); } }