Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's New In Laravel 5.3

What's New In Laravel 5.3

Chris Wilson will cover the shiny new features coming out in Laravel v5.3.

Chris Wilson

August 08, 2016
Tweet

More Decks by Chris Wilson

Other Decks in Programming

Transcript

  1. W H AT ' S N E W I N

    L A R AVE L 5 . 3 A T A L K B Y C H R I S W I L S O N
  2. S C O U T Laravel Scout is a driver

    based advanced Eloquent search, it supports Algolia out of the box.
  3. M A I L A B L E The new

    email class for sending emails in an intuitive and expressive way.
  4. N O T I F I C AT I O

    N S The new notifications class allow you to make quick updates through services like Slack, SMS, or Email.
  5. PA S S P O RT API authentication is complex

    and difficult to implement, but Laravel Passport makes installing and setting up OAuth 2 a cinch.
  6. PA S S P O RT N O R E

    A L LY I T ’ S AW E S O M E !
  7. R O L L B A C K O N

    E M I G R AT I O N Rollback one allows you to rollback just one migration instead of the whole batch.
  8. B L A D E F O R E A

    C H L O O P S
  9. B L A D E F O R E A

    C H L O O P S Inside of a Blade file's foreach loop, you can now have new $loop variables.
  10. B L A D E F O R E A

    C H L O O P S Probably a better way of doing it would to do something like this.
  11. R E T U R N C O L L

    E C T I O N A
  12. R E T U R N A C O L

    L E C T I O N Query builder now returns a collection instead of an array.
  13. N E W J S O N C O L

    U M N S Y N T A X
  14. N E W J S O N C O L

    U M N S Y N T A X While Laravel has had the ability to cast your data to and from JSON since version 5.0, it was previously just a convenience—your data was still just stored in a TEXT field. But MySQL 5.7 introduced an actual JSON column type.
  15. N E W J S O N C O L

    U M N S Y N T A X For example, lets say we have a players schema with a meta column.
  16. N E W J S O N C O L

    U M N S Y N T A X Our collection would look something like this.
  17. N E W J S O N C O L

    U M N S Y N T A X If we wanted to get all online players we could do something like this.
  18. N E W J S O N C O L

    U M N S Y N T A X If we wanted to update our player status, we could do something like this.
  19. R O U T I N G C H A

    N G E S I N 5 . 3 The routes.php file has been replaced with two new (web.php and api.php) files. Both of these files are now in the routes folder in the project’s root directory.
  20. D I R E C TO RY S T R

    U C T U R E C H A N G E S
  21. D I R E C TO RY S T R

    U C T U R E C H A N G E S With new Laravel 5.3 installs there are 4 directories that will no longer be included out of the box that where prior to 5.3 Events, Jobs, Listeners, and Policies These directories will automatically get added when they are needed by the frame work when an event, job, etc. is created.
  22. M U LT I P L E M I G

    R AT I O N PAT H S
  23. M U LT I P L E M I G

    R AT I O N PAT H S If you have ever installed a Laravel package that needs a migration, it involves copying it’s migrations into the migration folder, but with Laravel 5.3 - a package can define its own migration path.
  24. M U LT I P L E M I G

    R AT I O N PAT H S When you run php artisan migrate All migrations will run without you having to clutter your migration directory.