1

I upgraded my Laravel project from version 5.8 to 6 and some ajax calls are now broken. I'm attaching the screenshot of the error I'm facing related to ajax call using jquery below.

Error in console

My hunch is that it's not related to csrf token because I've excluded these requests from VerifyCsrfToken middleware (using except array) code below:

protected $except = [
  '/get-post-data',
  '/get-post-count',
  '/get-post-data',
];

Php version: 7.2.34
OS: Ubuntu 20.04

Could you please help me to solve this error? I can also provide more information if required. Thanks a thousand times.

Solution is given in comments by iamab-in and link to answer is this

  • 2
    what does the exception says? check `dd($exception)` result from your `catch` block or `Handler.php` – iamab.in Nov 11 '20 at 07:34
  • I added dd() and code is looking like (in Handler.php) ``` public function render($request, Exception $e) { dd($e); return parent::render($request, $e); } ``` It returned [image](https://imgur.com/a/XRQ8p4M) – Amanjot Singh Nov 11 '20 at 07:44
  • 1
    check `Network` tab in the browser developer options. – iamab.in Nov 11 '20 at 07:46
  • In `Network` tab I got [this error](https://imgur.com/0SVJuHz) @iamab.in – Amanjot Singh Nov 11 '20 at 07:48
  • 2
    `'Class Illuminate\Support\Facades\Input' Not found In BrowseController.php` is the issue. Check [this](https://stackoverflow.com/a/58079332/6274211) SO answer. – iamab.in Nov 11 '20 at 07:51
  • It worked. I'm so much Thankful to you bro. Even I can't explain. Just Thank you soo much bro :pray [You shared solution helped](https://stackoverflow.com/questions/58078757/class-illuminate-support-facades-input-not-found/58079332#58079332) – Amanjot Singh Nov 11 '20 at 08:01

0 Answers0