How to create view Laravel - File Uploading ?

Answer Posted / sunil kumar

Create a view file called resources/views/uploadfile.php and copy the following code in that file.
resources/views/uploadfile.php

Example :

<html>
<body>
<?php
echo Form::open(array('url' => '/uploadfile','files'=>'true'));
echo 'Select the file to upload.';
echo Form::file('image');
echo Form::submit('Upload File');
echo Form::close();
?>
</body>
</html>

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is validation in laravel and how it is used?

522


Explain how to upgrade valet to valet 2.0?

577


Tell me how do you do dependency injection in laravel?

480


What is url in laravel?

536


Difference between facades vs. Dependency injection?

562


Explain how to register a service provider via composer in laravel?

497


What are string and array helpers functions in laravel?

542


What is seed in laravel?

588


List server requirements for installing laravel 5.5?

517


How do I perform dependency injection in laravel?

462


By default valet serve your app on which tld? How to configure it to use another domain?

529


What are route prefixes?

541


List some features of laravel 5.0?

505


What is the use of php compact function?

554


Write a code to upload a file in laravel 5?

584