Support the ongoing development of →
posted 8 years ago
Input Forms
Last updated 2 years ago.

your ajax url should be relative to the root : change url:'add-catagory', to url:'/add-catagory',

try using Request class;

public function catadd($request){
    if ($request->hasFile('photo')) {

i could be wrong but doesnt your ajax request supposed to be of a different type other than post for file uploads? probably not...


try this....


If you want multiple Image Upload with preview then this link can help you :


As long as your route and controller are concerned, they are configured right (check your code from this tutorial of laravel file and image upload). So the problem might be with AJAX configuration. Check your AJAX/jQuery file.


Sign in to participate in this thread!


Your banner here too?

jishadp jishadp Joined 31 Jul 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.