Closed Nagdev-Savita closed 3 years ago
@Nagdev-Savita can you please paste here the requests that you see in your Console?
@burfbari It returns whole designing of current page in console. Including each and every tag of current page.
@burfbari It returns whole designing of current page in console. Including each and every tag of current page.
Did you check the seesion token in your headers?
@burfbari Sorry, But i can't get exactly what you are asking to check. I had checked request of AJAX route in network and i didn't get anything as session token.
@Nagdev-Savita
From looking at your code you are not returning json from your controller back to the AJAX call and you are not setting the content type for the ajax call as JSON. These are the usual suspects for returning the HTML page.
https://stackoverflow.com/questions/46600395/ajax-response-returns-html-content/46600478
As this is not a package bug I am closing this ticket.
Expected Behaviour
While calling controller through ajax from blade file it have to return product data in console
Current Behavior
In ajax call html content is returned
Failure Information
I have tried to remove middleware from route then it is working fine. But after that i am not able to get product data in controller.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Route::get('get-product',[App\Http\Controllers\AjaxController::class,'getProducts'])->middleware(['verify.shopify'])->name('get.products');
Context