Project to understand the package UI and authentication Web, native of Laravel, Email Send to user's verification
Installations
composer create-project --prefer-dist laravel/laravel App_control_task "8.5.9"
composer require laravel/ui:^3.2
php artisan ui bootstrap --auth
npm install
npm run dev
php artisan make:controller --resource TaskController --model:Task
06) Configure email variables in .env, if you use Gmail, configure generate App password (Manage Account>Security>2 Steps verification>Active Passwords for App_Folder )
07) Create a Template email with Markdown: folders: (App_Folder/resource/views/emails/message.blade.php) and (App_Folder/app/mail/MessageMail.php)
php artisan make:mail MessageMail --markdown emails.message
08) Create a set of views to customize the email template, folder: (App_Folder/resource/views/vendor/mail)
php artisan vendor: publish (option 14)
09) Continue creating the Notification Class to Reset Password, folder: (App_Folder/app/Notifications/)
php artisan make:notification ResetPasswwordNotification
php artisan make:notification VerifyEmailNotification
php artisan make:mail NewTaskMail --markdown emails.new_task
php artisan make:model Task.
php artisan migrate.
php artisan serve.
php artisan create:migration create_tasks_table.
php artisan make:migration create_tasks_table.
php artisan make:migration alter_table_tasks_relation_users.
php artisan migrate.
public const HOME = '/task';
13) Install laravel excel and mpdf, installation site: L I N K
php composer require maatwebsite/excel=^3.1.0 --ignore-platform-reqs
php artisan vendor:publish --provider "maatwebsite\Excel\ExcelProvider" --tag=config
php artisan make:export TaskExport --model=Task
php composer require mpdf/mpdf=^8.0.10 --ignore-platform-reqs
14) Copy the codes of App_Task.
- MessageMail Controller - Was used to test the receive email
- NewTaskMail Controller - Attention to methods: construct and build
- Routes Web - Routes Web in laravel framework, details os use with email routes
- .env - Configuration file, ex: MAIL_PASWORD=****
- Vendor Publish - Files Created after command vendor:publish
- Reset Password Notification - Notification created - Attention to method: toMail
- Verify Email Notification - Attention to methods: toMail, buildMailMessage, verificationUrl, createUrlUsing, toMailUsing.
- Reset Password Controller - Atttention rules() method, validation
- View of email verification - A view of verify
- Migrations of task - Laravel migrations
- View New_task with Markdown component - Component in view with markdown
- Route Service Provider - Attention to const HOME
- View Index Task - Only a Main view of task, list all taks
- View Create Task - A view to create task
- View Edit Task - A view to Edit task
- View Show Task - A view to Show task
- LAYOUT MAIN app.blade.php - Main Layout of App, will use the @guest ..@endguest or @auth..@endauth methods
- Package.json - dependences js
- Routes/web.php - Routes added
- app/Http/controllers/Auth - Controllers of authenticate codes - L i n k
- app/Model/User.php - Attention to Trait Notifiable and Methods: sendPasswordResetNotification and sendEmailVerificationNotification. $this->notify came of trait. L i n k
- public/css/app.css - L i n k
- public/js/app.js - L i n k
- Resource/views => Home.blade.php
- Resource/views => A u t h
- Resource/Views => L a y o u t s
- Resources/js/Bootstrap - Configurations, definitions, front end - L i n k
HTML Method | Controller and Method | Route | Vendor/laravel/ui/auth-backend (Trait) |
---|---|---|---|
GET/LOGIN | LoginController@showLoginForm | auth.login | AutenticatedUsers |
POST/LOGIN | LoginController@login | auth.login | AutenticatedUsers |
GET/REGISTER | RegisterController@showRegistrationForm | auth.register | RegisterUsers |
POST/REGISTER | RegisterController@register | auth.register | RegisterUsers |
GET/HOME | HomeController@index | home | -------- |
- Laravel Sending Email - TutorialsPoint - L I N K
- Login And Registration Email Verification in Laravel 8 - OnLineWebTutor - L I N K
- Laravel Mail: How to Send Emails Easily in Laravel - Iankumu - LI N K
- Envio de Email no Laravel - EspeciaizaTI - L I N K
- Como enviar emails com Gmail e Laravel - Laraveling - L I N K
- Laravel 8 Authentication with Laravel UI - LaraInfo - L I N K
- Laravel UI Login Register Email Verification in Laravel 8 - OnlineWebTutor - L I N K