06.10.2016 Views

laravel-5

Create successful ePaper yourself

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

Upgrade Guide 40<br />

1 $collection->lists('id')->all();<br />

Commands & Handlers<br />

The app/Commands directory has been renamed to app/Jobs. However, you are not required to move<br />

all of your commands to the new location, and you may continue using the make:command and<br />

handler:command Artisan commands to generate your classes.<br />

Likewise, the app/Handlers directory has been renamed to app/Listeners and now only contains<br />

event listeners. However, you are not required to move or rename your existing command and event<br />

handlers, and you may continue to use the handler:event command to generate event handlers.<br />

By providing backwards compatibility for the Laravel 5.0 folder structure, you may upgrade your<br />

applications to Laravel 5.1 and slowly upgrade your events and commands to their new locations<br />

when it is convenient for you or your team.<br />

Blade<br />

The createMatcher, createOpenMatcher, and createPlainMatcher methods have been removed<br />

from the Blade compiler. Use the new directive method to create custom directives for Blade in<br />

Laravel 5.1. Consult the extending blade documentation for more information.<br />

Tests<br />

Add the protected $baseUrl property to the tests/TestCase.php file:<br />

1 protected $baseUrl = 'http://localhost';<br />

Translation Files<br />

The default directory for published language files for vendor packages has been moved. Move<br />

any vendor package language files from resources/lang/packages/{locale}/{namespace} to<br />

resources/lang/vendor/{namespace}/{locale} directory. For example, Acme/Anvil package’s<br />

acme/anvil::foo namespaced English language file would be moved from resources/lang/packages/en/acme/anvil/foo.php<br />

to resources/lang/vendor/acme/anvil/en/foo.php.

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

Saved successfully!

Ooh no, something went wrong!