skip to Main Content

how to solve id in route and controller in laravel localization

I get the error: Missing required parameter for [Route: postDetails] [URI: {language}/cars/{id}] [Missing parameter: id]." My Routes: Route::prefix('{language}')->group(function () { Route::get('/',[HomeController::class,'homePage'])->name('home'); Route::get('cars',[AllPostsController::class,'allPosts'])->name('allPosts'); Route::get('cars/{id}',[AllPostsController::class,'details'])->name('postDetails'); }); My Middleware: public function handle(Request $request, Closure $next): Response { App::setLocale($request->language); return $next($request); } My Controller:…

VIEW QUESTION

How to add fullcallendar to a laravel app

I am trying to integrate fullcallendar in a laravel10 + Metronic app helpers.addVendors(['fullcalendar']); called from controller gives error: Undefined constant "AppHttpControllershelpers" CODE: <?php namespace AppHttpControllers; use AppModelsUser; use IlluminateHttpRequest; class CalendarController extends Controller { public function index() { helpers.addVendors(['fullcalendar']); return…

VIEW QUESTION
Back To Top
Search