skip to Main Content

How do I redirect with ajax to a dynamic link in laravel

I'm trying to return a view with some data in it with ajax I tried like this: $.ajax({ url: '/canvas', data:{ size:data.drawing['canvas_size'], name: data.drawing['name'], id: data.drawing['id'] } });` and this is the route: Route::get('canvas/{size}/{name?}/{id?}',[DrawingController::class,'canvas'])->name('canvas'); it just gives the 404 error,can…

VIEW QUESTION

problems with routes laravel

After data from a form is saved i wanted to get back to the admin page. I checked the database and the new data was there but I got an error: "Route [pages.admin] not defined." My Admin Controller code: <?php…

VIEW QUESTION

Not able to access session data inside web.php – Laravel

I want to use session variable in my web.php file. As I want to create dynamic route according to current_index from session. And current_index is changed as per different login. $index = Session::get('current_index'); Route::prefix($index)->group(function () { Route::get('index', [SystemConfigController::class, 'index'])->name('systemConfig.index'); Route::post('list',…

VIEW QUESTION
Back To Top
Search