In this online tutorial, we will create a very simple application that will only do two things:
- handle file uploads from web form
- display of previously uploaded files on another page.
For this project, our application will be write-only. This means that the user can only write files and view the list of downloaded files. This application is very simple, but it should serve as a good practice to start developing your Laravel skills and knowledge. Note that I’ve ruled out any modeling, migration, and database authentication for brevity, but in a real application these are additional things you’ll want to consider.
Here is a list of the components we need to get the app to work properly:
- A route that will allow the outside world (Internet) to use the application, and also specify an endpoint that will indicate where the logic for saving the downloaded file is located
- The controller that handles the response stream request
- The template that will be used to display a list of previously uploaded files and the actual upload form itself
- Request for what the controller will use to validate the data submitted from the web form