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

Laravel5.5 - Package Auto Discoveryを理解する

k-kurikuri
September 13, 2017

Laravel5.5 - Package Auto Discoveryを理解する

LaraLa vol.1 LT資料

k-kurikuri

September 13, 2017
Tweet

More Decks by k-kurikuri

Other Decks in Programming

Transcript

  1. laravel-debugbarͷinstallखॱ • composer require -dev laravel-debugbar • app.phpͷprovider, aliasesΩʔʹ֘౰͢Δ ServiceProvider,

    FacadeΛιʔεʹ௥Ճ͢Δ php artisan vendor:publish΋खॱͱͯ͋͠Γ·͕͢ɺ Auto Package Discoveryͱ͸ؔ܎ͳ͍ͨΊׂѪ
  2. Auto Package Discoveryͷ ࢓૊Έ • composer.jsonͷ{“extra” : ”laravel"}͔Β ServiceProvider, FacadeΛࣗಈϩʔυ

    • composer installޙʹ࡞੒͞ΕΔɺvendor/ composer/installed.json͔Β࣮ࡍ͸ϩʔυ͢Δ • Laravelىಈ࣌ʹطଘͷServiceProvider, Facadeͷ ഑ྻϦετʹϚʔδ͞ΕॳظԽ͞ΕΔ
  3. "extra": { "laravel": { "providers": [ "Barryvdh\\Debugbar\\ServiceProvider" ], "aliases": {

    "Debugbar": "Barryvdh\\Debugbar\\Facade" } } } laravel-debugbarͷ composer.jsonΛҰ෦ൈਮ
  4. ·ͱΊ • composerϥΠϒϥϦΛ࢖͏ࡍ͸ɺ࢓૊ΈΛಛʹؾʹ͠ͳ ͍Ͱ࢖͑Δ • composer.jsonͷ{“extra” : “laravel”}ʹରԠͯ͠ͳ͍ϥΠϒ ϥϦʹ͸దԠ͞Εͳ͍ •

    ࣗ࡞ͰcomposerΛެ։͢Δ࣌ʹ͸{“extra” : “laravel”}Λઃ ఆ͢ΔͱϢʔβʔϑϨϯυϦʔʹ • ·͊ɺͱʹ͔͘ศརʹͳͬͨʂ(ڧҾ)