Skip to content

Client and Admin Panel with multiple authentication guards in Laravel 11 (Vue 3, Sessions, Social Login, Spatie Permissions, 2FA emails, Auth emails, Local package dev).

Notifications You must be signed in to change notification settings

atomjoy/dev-panel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiple Authentication Guards in Laravel (Laravel 11, Vue 3.4)

Client and Admin Panel with multiple authentication guards in Laravel 11 (Vue 3, Sessions, Social Login, Spatie Permissions, 2FA emails, Auth emails, Local package dev).

Zawiera

SPA, client dashboard, router, stores, locales, themes, fontawesome.css, animate.css, custom inputs, code highlightjs.

Vue

Zainstaluj node.js i pobierz repozytorium z githuba rozpakuj i przejdż do katalogu.

Instaluj, kompiluj

npm install
npm run build

Laravel

Zainstaluj composer

Aktualizuj

composer clear-cache
composer update
composer dump-autoload -o

Konfiguracja

// config/apilogin.php
return [
  // Admin users emails (email with dns mx)
  'super_admin_email' => 'superadmin@gmail.com',
  'admin_email' => 'admin@gmail.com',
  'worker_email' => 'worker@gmail.com',

  // Admin users passsword
  'super_admin_password' => 'Password123#',
  'admin_password' => 'Password123#',
  'worker_password' => 'Password123#',
]

Uruchom

php artisan key:generate
php artisan migrate:fresh
php artisan config:clear
php artisan storage:link

php artisan serve
php artisan serve --host=localhost --port=8000

Dev

Mysql user i db

CREATE DATABASE IF NOT EXISTS laravel CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE IF NOT EXISTS laravel_testing CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'toor' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO root@127.0.0.1 IDENTIFIED BY 'toor' WITH GRANT OPTION;

2FA auth

Two factor auth redirection url (vue).

/login/f2a/{hash}
/admin/login/f2a/{hash}

S3 dysk

FILESYSTEM_DISK=s3

Uruchom testy

php artisan test --stop-on-failure --testsuite=Dev

Screenshots