Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Pass dynamic props correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
zaknesler committed Aug 25, 2020
1 parent 428f94e commit 2dd56f1
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/stubs/views/auth/auth/login.stub
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<x-template.base content-full title="Sign in">
<x-template.form subtext="Sign in to your account" action="{{ route('login') }}" method="POST">
<x-template.form subtext="Sign in to your account" :action="route('login')" method="POST">
<div class="space-y-6">
<x-form.input autofocus required name="email" type="email" label="Email" placeholder="you@example.com" />
<x-form.input required name="password" type="password" label="Password" placeholder="••••••••" />
Expand All @@ -13,15 +13,15 @@

<div class="text-sm text-center">
@if (Route::has('register'))
<x-link class="font-semibold" href="{{ route('register') }}" text="Create account" />
<x-link class="font-semibold" :href="route('register')" text="Create account" />
@endif

@if (Route::has('register') and Route::has('password.request'))
<span class="mx-1 text-gray-500">&middot;</span>
@endif

@if (Route::has('password.request'))
<x-link href="{{ route('password.request') }}" text="Forgot password?" />
<x-link :href="route('password.request')" text="Forgot password?" />
@endif
</div>
</x-template.form>
Expand Down
4 changes: 2 additions & 2 deletions src/stubs/views/auth/auth/passwords/confirm.stub
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<x-template.base content-full title="Confirm your password">
<x-template.form subtext="Please confirm your password before continuing" action="{{ route('password.confirm') }}" method="POST">
<x-template.form subtext="Please confirm your password before continuing" :action="route('password.confirm')" method="POST">
<x-form.input autofocus required name="password" type="password" label="Password" placeholder="••••••••" />

<div class="flex items-center justify-between">
@if (Route::has('password.request'))
<x-link class="text-sm font-semibold" href="{{ route('password.request') }}" text="Forgot password?" />
<x-link class="text-sm font-semibold" :href="route('password.request')" text="Forgot password?" />
@endif

<button class="btn px-5 py-2 text-sm">Confirm</button>
Expand Down
4 changes: 2 additions & 2 deletions src/stubs/views/auth/auth/passwords/email.stub
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<x-template.base content-full title="Reset your password">
<x-template.form
subtext="Enter your email and we'll send you a link to reset your password"
action="{{ route('password.email') }}"
:action="route('password.email')"
method="POST"
>
<x-form.input autofocus required name="email" type="email" label="Email" placeholder="you@example.com" />
Expand All @@ -10,7 +10,7 @@
<div class="text-sm">
Remember it?

<x-link class="font-semibold" href="{{ route('login') }}" text="Sign in" />
<x-link class="font-semibold" :href="route('login')" text="Sign in" />
</div>

<button class="btn px-5 py-2 text-sm">Send Link</button>
Expand Down
4 changes: 2 additions & 2 deletions src/stubs/views/auth/auth/passwords/reset.stub
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<x-template.base content-full title="Reset your password">
<x-template.form subtext="Reset your password" action="{{ route('password.request') }}" method="POST">
<x-template.form subtext="Reset your password" :action="route('password.request')" method="POST">
<input type="hidden" name="token" value="{{ $token }}">

<div class="space-y-4">
<x-form.input autofocus required name="email" type="email" label="Email" value="{{ request('email') }}" placeholder="you@example.com" />
<x-form.input autofocus required name="email" type="email" label="Email" :value="request('email')" placeholder="you@example.com" />
<x-form.input required type="password" name="password" label="Password" placeholder="••••••••" />
<x-form.input required type="password" name="password_confirmation" label="Confirm Password" placeholder="••••••••" />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/stubs/views/auth/auth/register.stub
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<x-template.base content-full title="Sign up">
<x-template.form subtext="Create a new account" action="{{ route('register') }}" method="POST">
<x-template.form subtext="Create a new account" :action="route('register')" method="POST">
<div class="space-y-6">
<x-form.input autofocus required type="text" name="name" label="Name" placeholder="John Doe" />
<x-form.input required type="email" name="email" label="Email" placeholder="you@example.com" />
Expand All @@ -11,7 +11,7 @@
<div class="text-sm">
Have an account?

<x-link class="font-semibold" href="{{ route('login') }}" text="Sign in" />
<x-link class="font-semibold" :href="route('login')" text="Sign in" />
</div>

<button class="btn px-6 py-3 text-sm">Sign up</button>
Expand Down
2 changes: 1 addition & 1 deletion src/stubs/views/auth/auth/verify.stub
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<div>
Didn't get the email?
<x-form.action action="{{ route('verification.resend') }}" method="POST" class="font-semibold text-brand-600 hover:text-brand-800">Resend it</x-form.action>
<x-form.action :action="route('verification.resend')" method="POST" class="font-semibold text-brand-600 hover:text-brand-800">Resend it</x-form.action>
</div>
</div>
</x-template.branded>
Expand Down
2 changes: 1 addition & 1 deletion src/stubs/views/auth/components/template/error.stub
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>

<div>
<x-link href="{{ route('home') }}">&larr; Home</x-link>
<x-link :href="route('home')">&larr; Home</x-link>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/stubs/views/auth/partials/_header.stub
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<nav class="sm:flex sm:items-center" aria-label="Right navigation">
<ul class="sm:flex sm:items-baseline">
@auth
<x-nav-item action="{{ route('logout') }}" method="POST" id="logout-form">Sign out</x-nav-item>
<x-nav-item :action="route('logout')" method="POST" id="logout-form">Sign out</x-nav-item>
@else
<x-nav-item route="login">Sign in</x-nav-item>
<x-nav-item route="register">Sign up</x-nav-item>
Expand Down

0 comments on commit 2dd56f1

Please sign in to comment.