Laravel 5.3 making life better.
Install laravel 5.3
“Composer create-project laravel/laravel
laravel53 dev-develop”
Directory Structure :
laravel 5.3 directory structure easylaravel blog
Simplified Routes in parent folder named “routes”
Routes.php in laravel is provided in parent folder of laravel
project with two files:
1. Web.php
All web application routes are entered in routes/web.php.
laravel 5.3 routes/web.php for web routes- easylaravel blog |
2. Api.php
All api route calls
should be written in routes/api.php file .The advantage is that we get
prefix added and required middleware’s
are only applied for api calls such as ‘api.auth’ and throttle.
laravel 5.3 routes/api.php for api routes- easylaravel blog
laravel 5.3 routes/api.php for api routes- easylaravel blog |
Events,listener,policies :
Keeping newbie’s in mind,laravel has
made directory structure more concise by showing only what is needed to make
application run.Folders like ‘events’,’jobs’,’policies’ are not shown.
You wont see it until u run the command.When you create events or
jobs the event directory is created with event file in it.
Project/app
directory structure
Query builder returns collection
Apply methods on collection in laravel 5.3
query builder.In laravel previous version query builder did not returned any
collections when DB::raw() queries were run, so we were not able to use
collection method on them. So to make our life more easier laravel has added
this functionality.