UNIT 4.1 - Creating A Laravel User Authentication Using Jetstream and Livewire
UNIT 4.1 - Creating A Laravel User Authentication Using Jetstream and Livewire
Overview/Introduction
This course provides an overview and discussions of the web development framework Laravel. This
course include: brief history of web frameworks, introduction on PHP frameworks, the development
framework Laravel, Installation via composer, initial configuration, directory configuration, Laravel file
Structure, local development environment, Git bash, PHP artisan commands, Routes, Middleware,
CSRF protection, Controllers, Requests, Responses, Views, Blade Templates, Session, Validation, Error
Handling, Models, Database Migrations, Eloquent, and Simple App Testing. This course focuses on
developing a web application using Laravel framework with CRUD+S – create, read, update, delete
and search functionality as final output in the course subject.
UNIT 4.1 – Creating a Laravel User Authentication using Jetstream and Livewire
Lesson/Topics:
Unit overview
Unit4 describes and provides familiarity on how to use Eloquent and model classes and how to use
them. It also details out working with migrations and on how to retrieve data from tables using models
Learning Outcomes
1. composer create-project
laravel/laravel newpl
1. Run xampp
2. Click start button for Apache
3. Click start button for MySQL
Open phpmyadmin.
1. Open a browser
2. Type
localhost/phpmyadmin at the
address bar
3. Press enter
Create a database
1. Go back to VSCode
5. Run the application by typing php artisan serve at the terminal, then click the address
http://127.0.0.1:8000 to open our application in browser.
This is our application running on browser.
Since we already have a laravel project running and with a database, we can start creating our
laravel authentication scaffolding using Jetstream.
1. Open new terminal again from VSCode, then type in composer require
laravel/jetstream
Laravel Jetstream was written by Taylor Otwell.
Laravel Jetstream is a beautifully designed application scaffolding for Laravel. Jetstream provides the perfect
starting point for your next project and includes login, registration, email verification, two-factor authentication,
session management, API support via Laravel Sanctum, and optional team management. Laravel Jetstream
replaces and improves upon the legacy authentication UI scaffolding available for previous versions of Laravel.
Jetstream is designed using Tailwind CSS and offers your choice of Livewire or Inertia scaffolding.
1. Still on terminal
2. Type in php artisan Jetstream:install livewire
3. Then press enter
Wait to finish…
If livewire scaffolding is installed you should be able to see the screen the message livewire
scaffolding installed successfully.
Mix is a configuration layer on top of webpack, so to run your Mix tasks you only need to execute
one of the NPM scripts that are included in the default Laravel package.json file. When you run
the dev or production scripts, all of your application's CSS and JavaScript assets will be compiled
and placed in your application's public directory:
1. Still on terminal, type in php artisan migrate, press enter and wait to finish…
What’s happening is that the database tables are being migrated into the database we created
earlier.
You should be able to see that links for login and register on the top left corner of your application,
Click login or register to view changes.
You should be able to see the output similar to the following screenshots…
Screenshot 1 – login page
Reference:
https://laravel.com/docs/8.x/releases#laravel-jetstream
https://laravel.com