29.07.2016 Views

laravel-5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Release Notes 8<br />

Folder Structure<br />

To better express intent, the app/Commands directory has been renamed to app/Jobs. Additionally,<br />

the app/Handlers directory has been consolidated into a single app/Listeners directory which<br />

simply contains event listeners. However, this is not a breaking change and you are not required to<br />

update to the new folder structure to use Laravel 5.1.<br />

Encryption<br />

In previous versions of Laravel, encryption was handled by the mcrypt PHP extension. However,<br />

beginning in Laravel 5.1, encryption is handled by the openssl extension, which is more actively<br />

maintained.<br />

Laravel 5.0 {#releases-<strong>laravel</strong>-5.0}<br />

Laravel 5.0 introduces a fresh application structure to the default Laravel project. This new structure<br />

serves as a better foundation for building a robust application in Laravel, as well as embraces new<br />

auto-loading standards (PSR-4) throughout the application. First, let’s examine some of the major<br />

changes:<br />

New Folder Structure<br />

The old app/models directory has been entirely removed. Instead, all of your code lives directly<br />

within the app folder, and, by default, is organized to the App namespace. This default namespace<br />

can be quickly changed using the new app:name Artisan command.<br />

Controllers, middleware, and requests (a new type of class in Laravel 5.0) are now grouped under the<br />

app/Http directory, as they are all classes related to the HTTP transport layer of your application.<br />

Instead of a single, flat file of route filters, all middleware are now broken into their own class files.<br />

A new app/Providers directory replaces the app/start files from previous versions of Laravel<br />

4.x. These service providers provide various bootstrapping functions to your application, such as<br />

error handling, logging, route loading, and more. Of course, you are free to create additional service<br />

providers for your application.<br />

Application language files and views have been moved to the resources directory.<br />

Contracts<br />

All major Laravel components implement interfaces which are located in the illuminate/contracts<br />

repository. This repository has no external dependencies. Having a convenient, centrally located set<br />

of interfaces you may use for decoupling and dependency injection will serve as an easy alternative<br />

option to Laravel Facades.<br />

For more information on contracts, consult the full documentation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!