Without the error message and controller code it will be difficult to help.
TorchSK said:
Without the error message and controller code it will be difficult to help.
thanks for reply .when I click on add btn the console output gives me the 404 not found error and refer to this line of my jquery main file that I downloded from http://code.jquery.com/jquery-latest.min.js:
it is :
f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();
jonitopsg said:
Try this in your if: if( title == true)
thanks for reply . I tried this . it just go to "else" part . but when I write if(title!=null) it shows me the same problem that I wrote to TorchSK.
Do you have your
Route::post('add', ... )
defined correctly in routes.php?
TorchSK said:
Do you have your Route::post('add', ... ) defined correctly in routes.php?
it's my route for /add:
Route::post('/add', function() /// I tested with get too . for both of them it gives me the same 404 error
{
return 'The Request is AJAX!';
});
Paste the entire routes.php please. Use http://laravel.io/bin
Are you sure, that the request by ajax is to http://mydomain.com/add with POST method? It seem OK from the code though :)
TorchSK said:
Paste the entire routes.php please. Use http://laravel.io/bin
Are you sure, that the request by ajax is to http://mydomain.com/add with POST method? It seem OK from the code though :)
I really thanks for your reply. it's my code http://laravel.io/bin/2ezaM
I am little confused. The route is different then you pasted before. But never mind.
Do you have
public $restful = true;
In your controller?
TorchSK said:
I am little confused. The route is different then you pasted before. But never mind.
Do you havepublic $restful = true;
In your controller?
yes I did. when I click the Add btn .it's my console reaction https://www.filepicker.io/api/file/2NDGQ6smTSyY6zglecL9
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community