Answer Posted / rachana devi
Uploading Files in Laravel is very easy. All we need to do is to create a view file where a user can select a file to be uploaded and a controller where uploaded files will be processed.
In a view file, we need to generate a file input by adding the following line of code.
Syntax : Form::file('file_name');
In Form::open(), we need to add ‘files’=>’true’ as shown below. This facilitates the form to be uploaded in multiple parts.
Syntax : Form::open(array('url' => '/uploadfile','files'=>'true'));
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to use select query in laravel?
Does laravel support php 7?
What is the difference between print_r and var_dump?
Explain how to redirect user with flashed session data in laravel?
What are the 3 service provider types?
What are the difference between laravel 5 & laravel 4?
How to rollback last migration?
Explain how to do 301 redirects in laravel?
Explain bundles in laravel?
Why composer is used in laravel?
What is x-xsrf-token?
what is meant by Views ?
Command to connect vagrant via ssh?
What is facades in laravel?
What is service providers?