Professional Documents
Culture Documents
Seminor-Ppt New
Seminor-Ppt New
Seminar
On
Core Knowledge of laravel and
Authentication
Presented by
Praveen Dinesh Datrange
Guided by
Prof. Javed Attar
Name-Praveen Datrange, Roll No-06 MCA Department, Bhujbal Knowledge City
Bhujbal Knowledge City
MET Institute of Engineering
CONTENTS
Laravel Introduction
What is Authentication
Authentication process
Email Verifaction
Advantages
Drawbacks
Conclusion
Name-Praveen Datrange, Roll No-06 MCA Department, Bhujbal Knowledge City
Bhujbal Knowledge City
MET Institute of Engineering
LARAVEL INTRODUCTION
Laravel is an open-source PHP framework, which is robust and
easy to understand. It follows a model-view-controller design
pattern. Laravel reuses the existing components of different
frameworks which helps in creating a web application. The web
application thus designed is more structured and pragmatic.
If you are familiar with Core PHP and Advanced PHP, Laravel
will make your task easier. It saves a lot time if you are
planning to develop a website from scratch. Moreover, a
website built in Laravel is secure and prevents several web
attacks.
Name-Praveen Datrange, Roll No-06 MCA Department, Bhujbal Knowledge City
Bhujbal Knowledge City
MET Institute of Engineering
What is Authentication
AUTHENTICATION PROCESS
Step 1:- Create the application
We need to run command to create laravel project.
laravel new multi-auth
Step 2:- Create the database
• We will use SQL database for our application. It is lightweight, fast
and uses a simple flat file.
Step 3: Creating migrations
Create migration for admins
php artisan make:migration create_admins_table
Now, create a migration for bloggers
php artisan make:migration create_users_table
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
'admins' => [
'driver' => 'eloquent',
'model' => App\Admin::class,
],
AUTHENTICATION PROCESS
Step 7:- Set up the controllers
To use our guards for authentication, we can either modify the existing
authentication controllers or create new ones.
Modify LoginController
Open the LoginController in app/Http/Controllers/Auth and edit as follows:
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{ use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
}
Name-Praveen Datrange, Roll No-06 MCA Department, Bhujbal Knowledge City
npm
phpinstall
artisan&&
ui vue
npm--auth
run dev
AUTHENTICATION PROCESS
Now, Modify RegisterController
Open the RegisterController and edit it
registration is complete.
AUTHENTICATION PROCESS
This will generate view files in resources/views/auth along with routes to handle
basic authentication for our application. Is that cool or what?
AUTHENTICATION PROCESS
Admin Registration Screen
AUTHENTICATION PROCESS
Step 12:- Modify authentication exception handler
The unauthenticated method we just added resolves this issue we
have. It receives an AuthenticationExpection exception by default
which carries that guard information. Sadly, we cannot access that,
because it is protected
Email Verification
In laravel old version we are doing email verification process manually,
but in laravel 5.8 they provide in build email verification setup for new registered
users to must have to verify his email before proceed. You just need to make
some basic setup with need to use middleware, routes and mail configuration
verify link
it is a MVC framework that can manange think in model view and controller
Laravel offers a rich set of functionalities which incorporates the basic features
of PHP frameworks like CodeIgniter, Yii and other programming languages
like Ruby on Rails. Laravel has a very rich set of features which will boost
the speed of web development.
Question ??
Thank you!