Hi. The error message doesn't indicate which route you tried to access. Kindly post the datatable route logic.
NotFoundHttpException Error
Hi All,
I am getting the following error from browser console whenever I reloaded my data table page:
message: "", exception: "Symfony\Component\HttpKernel\Exception\NotFoundHttpException",…}
exception: "Symfony\Component\HttpKernel\Exception\NotFoundHttpException"
file: "C:\Users\Supun Samarakoon\Desktop\Laravel Projects\LoginSystem\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php"
line: 179
message: ""
Any clue what is the reason behind this error. Since I figured this is a route related issue I checked my routes as well. But unable to find a issue there(As per my knowledge. I am a beginner in Laravel).
Routes:
<?php
use Illuminate\Support\Facades\Route;
/*...*/
Route::get('/', function () {
return view('auth/login');
});
Auth::routes();
Route::group(['middleware' => ['auth.roles']], function () {
/*Side bar menu Routes*/
Route::get('/home', 'HomeController@index')->name('home');
Route::get('/dashboard', 'HomeController@dashb')->name('dashboard');
Route::get('/profile', 'HomeController@profile')->name('profile');
/*Activity Sub Routes*/
Route::get('/jobEditCancel', 'JobController@jobEditCancel')->name('jobEditCancel');
Route::get('/jobAddCancel', 'JobController@jobAddCancel')->name('jobAddCancel');
/*Activity Resource Routes*/
Route::resource('/activity', 'JobController');
// Route::get('/activity', 'JobController@index')->name('activity.index');
// Route::delete('/activity/destroy/{id}', 'JobController@destroy')->name('activity.destroy');
/*FPBlog Routes*/
Route::resource('fpblog', 'PostController');
Route::get('/postEditCancel', 'PostController@postEditCancel')->name('postEditCancel');
Route::get('/blogManager', 'PostController@blogManager')->name('blogManager');
});
// Admin Tools
Route::namespace('Admin')->prefix('superadmin')->middleware(['auth', 'auth.admin'])->name('admin.')->group(function () {
Route::resource('users', 'UserController', ['except' => ['show', 'create', 'store']]);
Route::get('/impersonate/user/{id}', 'ImpersonateController@index')->name('impersonate');
});
Route::get('/admin/impersonate/destroy', 'Admin\ImpersonateController@destroy')->name('admin.impersonate.destroy');
Can anyone kindly help me with this?
Thank you each and every one of you who have tried your best to support me to solve this problem. However, after so many searches for the answer, I have figured it out.
Apparently my URI is far too long. Due to the high number of columns. I was able to understand this after moving my development environment to laravel Homestead.
I have followed the steps on this blog to shorten the URL. And it solved all the issues:
https://yajrabox.com/blog/datatables-and-long-url
Once again thank you very much for anyone who has provided their opinion. I hope this post will be useful to someone who is trying to create data tables which have high column counts.
Please or to participate in this conversation.