Slide 1

Slide 1 text

[Laravel5.6] CHANGELOGΛࣼΊಡΈ @Laravel/Vue.jsษڧձ#3

Slide 2

Slide 2 text

࿩͢͜ͱ • 2018/02ϦϦʔε༧ఆͷLaravel5.6 • ඞཁͳPHPͷversion͸? • CHANGELOG.md͔Βมߋ఺Λ͍͔ͭ͘ൈਮ • ॴײ

Slide 3

Slide 3 text

Who are you? • twitter @ k-kurikuri • ιʔγϟϧήʔϜΤϯδχΞ • Node.js, TypeScript, C#, Laravel…

Slide 4

Slide 4 text

Laravel5.6Ͱ ඞཁͳPHP -version͸?

Slide 5

Slide 5 text

composer.jsonΛݟͯΈΔ

Slide 6

Slide 6 text

"require": { "php": “^7.1.3", "…" } PHP 7.1.3Ҏ্͕ඞਢ

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

General • ApplicationΫϥεʹrunningUnitTestsϝιο υ͕௥Ճ • UnitTest࣮ߦத͔Ͳ͏͔Λ൑ఆ͢Δ • env(‘APP_ENV’) === ‘testing’ͷϥούʔ

Slide 9

Slide 9 text

Arrays • Illuminate\Support\Arr::wrap(null)͕ۭ഑ྻΛ ฦ͢Α͏ʹͳͬͨ • 5.5ver·Ͱ͸[null]͕ฦΔ͕ɺ5.6ver͸[]

Slide 10

Slide 10 text

Artisan Console • optimizeίϚϯυͷ࡟আ • 5.5verͰ͸deprecated͔ۭ࣮ͭ૷ͩͬͨ • Taylor͞Μᐌ͘ɺOpcacheͷ࠷దԽʹΑͬͯ optimizeίϚϯυʹΑΔύϑΥʔϚϯε޲্ ͕ෆཁʹͳͬͨͨΊ࡟আ

Slide 11

Slide 11 text

Artisan Console • migrate:statusͷग़ྗ݁ՌʹΧϥϜ͕௥Ճ • migrationͷ࣮ߦॱΛ؅ཧ͢ΔbatchΧϥϜͷ number͕֬ೝͰ͖ΔΑ͏ʹͳͬͨ

Slide 12

Slide 12 text

5.5ver

Slide 13

Slide 13 text

5.6ver

Slide 14

Slide 14 text

Database • Illuminate/Database/Schema/Blueprint:: morphsʹΑΔෳ߹indexఆٛॱ͕มߋ • [_id, _type]ͷෳ߹index͔Βɺ[_type, _id]ʹ • morphsϝιουΛ࢖༻͍ͯͨ͠ํ͸͝஫ҙ

Slide 15

Slide 15 text

Queues • Illuminate/Contracts/Queue/JobͷIFʹ getJobId(), payload()͕௥Ճ • IFΛ࣮૷ͨ͠JobυϥΠόʔ͸࣮૷ඞਢʹ

Slide 16

Slide 16 text

Responses • Controller͔ΒModel::create()ͷ݁ՌΛϨεϙ ϯε͢Δͱ… • HTTP 201 Created success͕ฦΔ

Slide 17

Slide 17 text

class UserController extends Controller { public function store(UserStoreRequest $request) { return User::create( $request->only(['email', ‘password’]) ); } // … }

Slide 18

Slide 18 text

Blade • csrf, methodσΟϨΫςΟϒ͕௥Ճ • @csrf, @method(‘PUT’)ͳͲͱهड़Մೳʹͳͬ ͨ

Slide 19

Slide 19 text

{{ csrf_field() }} {{ method_field('PUT') }} @csrf @method('put')

Slide 20

Slide 20 text

ॴײ • ࠓͷॴɺେ͖ͳมߋ͸ͳͦ͞͏ • frameworkҎ֎Ͱ΋มߋ఺͸͋ΔͱࢥΘΕ • 5.6branchʹPR͕͋Γɺ·ͩ·ͩߋ৽͋Γͦ ͏ • ϦϦʔε·Ͱ΋͏গ͠଴ͪ·͢