Laravel 5 multiple IMAGES upload inside form and saving img location in DB
06:25 06 Apr 2016

I have form and inside it I have textfields, checkboxes, selects and FILE upload. What I need is to upload images only and pass the location of the images to controller so I can save them to db.

Form + fileupload screenshoot

this is my controller:

    public function spremi(){

    $input= Request::all();
    Oglas::create($input);
    return redirect('other');
}

route:

Route::post('other', 'OglasController@spremi');

If I return the request, or create 'Oglas' for my database, only what I get is image name. And image is not uploaded anywhere? (ect. storage/.. , public/...).

{{Form::file('slike', ['class' => 'field']) }}

My question is: How to make things work the best way, so my images are uploaded to one folder, and only their correct location is saved in db?

I'm using Laravel 5.

php mysql laravel forms file-upload