Save 37% off PRO during our Black Friday Sale! »

about Laravel 5.3

66a86be239fea2303d0801990cdc13c7?s=47 localdisk
September 12, 2016

about Laravel 5.3

Laravel Meetup Vol.8 で話したスライドです。

66a86be239fea2303d0801990cdc13c7?s=128

localdisk

September 12, 2016
Tweet

Transcript

  1. about Laravel 5.3 Laravel Meetup Vol.8 @localdisk

  2. ࣗݾ঺հ দඌେ ·͓ͭ·͞Δ EEE ΤϯδχΞ Πϊϕʔλʔδϟύϯॴଐ ΤϯδχΞɾσβ ΠφɾσΟϨΫλΛืूத  ޷ධൃചத

    @localdisk
  3. • New Feature5.3 • SimplePagination • Notification • Upgrade •

    Auth • MySQL strict Mode • Upgrade͢΂͖͔? Agenda
  4. Simple Pagination New Feature 5.3

  5. 5.3Ҏલ͸PresenterΛఆٛ͢Δඞཁ͕͋ͬͨ Pagination customize is

  6. // Blade͕ࢦఆͰ͖ΔΑ͏ʹͳͬͨʂ {{ $users->links(‘pagination::bootstrap-4’) }} ΧελϚΠζ php artisan vendor:publish --tag=laravel-pagination

    • bootstrap-4.blade.php • default.blade.php • simple-bootstrap-4.blade.php • simple-default.blade.php Pagination customize is
  7. • $paginator • Illuminate\Pagination\Paginator • hasPages - ϖʔδ͕͋Δ͔? • onFirstPage

    - ࠷ॳͷϖʔδ • previousPageUrl - લͷϖʔδ • nextPageUrl - ࣍ͷϖʔδ • hasMorePages - ࣍ͷϖʔδ͕͋Δ͔ Pagination Ͱ࢖͏ϝιου
  8. • $elements • LengthAwarePaginatorͷΈ • paginateϝιου͸LengthAwarePaginator • simplePaginate͸Paginator • [ϖʔδ൪߸

    => URL] ͷ array PaginationͷϦϯΫͰ࢖༻͞ΕΔม਺
  9. Notification New Feature 5.3

  10. • ௨஌Ϋϥε • ࠓ·Ͱ͸Event࡞ͬͯΞϨίϨؤு͍ͬͯͨͷ͕ ਵ෼ָʹͳΔ • Ϣʔβʔ͕ొ࿥͞Εͨ • Ϣʔβʔ͕঎඼Λങͬͨ •

    ͓໰͍߹Θ͕ͤ͋ͬͨ • ౳ Notification
  11. • ඪ४Ͱ༻ҙ͞Ε͍ͯΔ௨஌ • Mail • Database • SMS • Slack

    • Laravel Notification Channels • http://laravel-notification-channels.com/ Notification
  12. • ௨஌ΫϥεΛ࡞੒͢Δ(make:notification) • ௨஌ର৅ͷΫϥεʹ Notifiable traitΛuse͢Δ class User { use

    Notifiable; } $user->notify(new UserRegisterd); • Event΍ExceptionHandlerͱซ༻͢Δ Notification
  13. Upgradeʹ͍ͭͯ Upgrade 5.3

  14. • ݁ߏมΘͬͯΔ • Route • logout͕POSTʹͳͬͨΓ • 5.3ҎલͷAuthΛ࢖ͬͯΔ৔߹͸मਖ਼͕ඞཁ • Route::get('/logout',

    ‘Auth\LoginController@logout'); • ύεϫʔυϦηοτʹNotification͕࢖༻͞Ε ͯͨΓ • https://laravel.com/docs/5.3/upgrade Auth
  15. • false -> true ΁ • ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,N O_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DI VISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_EN GINE_SUBSTITUTION

    • ࡶͳSQLॻ͍ͯΔͱͻͲ͍໨ʹ͍͋ͦ͏ MySQL Strict Mode
  16. • ࣮͸ͦΜͳʹେม͡Όͳ͍ • 5.3ͷ৽ػೳ͕࢖͍͍ͨ or 5.2Λ࢖ͬͯΔͷͰ ͋Ε͹΍͓ͬͯ͘ͷ͕Φεεϝ • 5.1࢖ͬͯΔਓ͸͓޷ΈͰ Upgrade͢΂͖͔?

  17. • http://tech.innovator.jp.net/entry/ 2016/08/17/115629 • http://tech.innovator.jp.net/entry/ 2016/08/02/111614 ࠓ೔ͷ಺༰͸େମϒϩάʹॻ͍ͯ·͢

  18. ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ