Does it work if you use a full url, I usually use full and have had no problems with ajax.
404 Not Found. Ajax Route get request not working as i wanted to :-(
Been busy with this since yesterday and believe me when i say i tried whatever i could think of and find on the net. but nothing helped. so im giving up on this one till a hero appears.
Route::post ('/search', [SearchController::class, 'send_http_request'])->name('searchReq');
var routeSearch = "{{ route('searchReq') }}"
ajaxService(routeSearch, value, label);
$.ajax
type:'GET',
url:routeSearch,
dataType: 'json',
encode : true,
data:{value:value, label:label},
@rebelutionairy You shouldn’t need to run this command in development.
I suspect your problem is that you actually need to clear your cache for your new routes to show.
By running route:cache you are regenerating the cache. If you destroy the cache with php artisan route:clear you will always have access to new routes if you’d change your routes file and don’t need to run any route commands.
Caching your routes is only necessary on production.
Please or to participate in this conversation.