As we all know , Jetstream login layout, That is very much simple , In this post i will guide you how to change that screen.
- Set a new Layout with blade and assets
- Change the input type name and value
- Now test it from another controller
- Replace the old file with your newly created file.
I hope laravel and Jetstream already installed. I will discuss how to change design.
I downloaded a HTML login template from google Link , You can also download or create a new one.
Step 1.
created a new blade file inside a directory names “authV2” , You can choose your own name. And set the assets file proper.
Step 2.
now change the input type email name and value
<input class="input100" placeholder="Email" type="email" name="email" value="@if(!empty(old('email'))) {{old('email')}} @endif" required autofocus>
also same for password
<input class="input100" placeholder="Password" type="password" name="password" required autocomplete="current-password">
and one more things change form action
<form class="login100-form validate-form" method="POST" action="{{ route('login') }}">
Step 3.
This is now seated, Create a new controller and check you are able to login or not.
Step 4.
In this step we have to change route file of Login, we can do by changing
App\Providers\JetstreamServiceProvider.php
Fortify::loginView(function () { return view('authV2.my_login'); });
add above line in boot method.
Your file will looks like below code
<?php namespace App\Providers; use Laravel\Fortify\Fortify; use App\Actions\Jetstream\DeleteUser; use Illuminate\Support\ServiceProvider; use Laravel\Jetstream\Jetstream; class JetstreamServiceProvider extends ServiceProvider { /** * Register any application services. * * @return void */ public function register() { // } /** * Bootstrap any application services. * * @return void */ public function boot() { $this->configurePermissions(); Jetstream::deleteUsersUsing(DeleteUser::class); Fortify::loginView(function () { return view('authV2.my_login'); }); } .... .... .... }
Now run , You will get a new design.
Thanks , if any confusion please comment below.