Blade Pattern

phpclassroom007

The last important piece of this puzzle is the blade template, which will contain all the HTML, CSS, and javascript for our simple application. Here’s the code – I’ll explain later. <body> <h1>

Controller modification

phpclassroom007

Open the app / Http / Controllers / UploadController and make the following changes to it: So this is a fairly simple approach to saving downloaded files to disk. Here’s a breakdown of

Creating validation logic

phpclassroom007

Let’s modify the request stub to suit the needs of our application. Modify the file so that it looks like this: <?php namespace App \ Http \ Requests; use Illuminate \ Foundation \

Generating a request

phpclassroom007

Before we go ahead and make a few changes to the generated UploadController stub, I think it makes more sense to create a request class first. This is because the controller method that

What is a controller in laravel?

phpclassroom007

The controller is the “C” in the “MVC” (Model-View-Controller) architecture that Laravel is based on. A controller can be reduced to this simple definition: it receives a request from the client and returns a

What is a route in laravel?

phpclassroom007

A route in Laravel is essentially an endpoint specified by a URI that acts as a “pointer” to some piece of functionality offered by the application. More often than not, the route simply

Application design: quickly reducing our requirements

phpclassroom007

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

How to download and install Laravel using...

phpclassroom007

 It assumes that a copy of PHP is already installed on your local system. If not, you can read how to install it here Composer is a package and dependency manager. To install it, open

Why Laravel?

phpclassroom007

Around 2000, most PHP code was procedural and could be found in the form of “scripts” that would be a mess of spaghetti code. Even on the simplest pages, there was no separation of

What is Laravel?

phpclassroom007

Laravel is a robust MVC framework for PHP created by Taylor Otwell. Since its initial release in June 2011 (version 1), it has been steadily gaining popularity in the PHP framework development sector. Much