diff --git a/source/_bootcamp/creating-chirps.md b/source/_bootcamp/creating-chirps.md index 9933050..c7dcd33 100644 --- a/source/_bootcamp/creating-chirps.md +++ b/source/_bootcamp/creating-chirps.md @@ -175,9 +175,7 @@ Then, let's create our `chirps.create` page view with the Chirps form: {{ __('Write a message to the World.') }} - - @include('chirps.partials.form') - + @include('chirps.partials.form') diff --git a/source/_bootcamp/editing-chirps.md b/source/_bootcamp/editing-chirps.md index 9bd44fa..817dd2a 100644 --- a/source/_bootcamp/editing-chirps.md +++ b/source/_bootcamp/editing-chirps.md @@ -65,7 +65,7 @@ We're going to use the `` component that comes with Turbo Breeze, wh @endunless+} -{+ @if (Auth::id() === $chirp->user->id) +{+ @if (auth()->user()->id === $chirp->user->id) @@ -127,19 +127,17 @@ Now, we need to create our `chirps.edit` view: ```blade - - -

- -

-
- -
-
+ +
+ {{ __('Chirps') }} + {{ __('Edit Chirp') }} + {{ __('Update your Chirp message.') }} + + @include('chirps.partials.form', ['chirp' => $chirp]) -
-
-
+ + + ```
@@ -149,23 +147,32 @@ We're using the same `form` partial the create chirps view uses. However, in thi ```blade -
+ @csrf @if ($chirp ?? false) @method('PUT') @endif
- - - + {{ __("What's on your mind?") }} + + + +
-
- - {{ __('Chirp') }} - - +
+ {{ __('Post') }} @if ($chirp ?? false) {{ __('Cancel') }} @endif diff --git a/source/_bootcamp/hotwiring-everything.md b/source/_bootcamp/hotwiring-everything.md index b3b44ab..24a0ccc 100644 --- a/source/_bootcamp/hotwiring-everything.md +++ b/source/_bootcamp/hotwiring-everything.md @@ -50,7 +50,7 @@ For that to work, we also need to wrap our create form with a matching Turbo Fra {- @include('chirps.partials.form')-} -{+ +{+ @include('chirps.partials.form') +} @@ -83,7 +83,7 @@ Before we change the `ChirpController`, let's give our list of chirps wrapper el {{ __('Write a message to the World.') }} -{- @include('chirps.partials.form')-} +{- -} {+ @include('chirps.partials.form') +} @@ -177,9 +177,9 @@ Now, let's also update the `chirps.edit` page to add a wrapping Turbo Frame arou {{ __('Update your Chirp message.') }} -{- @include('chirps.partials.form')-} +{- @include('chirps.partials.form', ['chirp' => $chirp])-} {+ - @include('chirps.partials.form') + @include('chirps.partials.form', ['chirp' => $chirp]) +}