dizatech / identifier
v1.8.7
2021-09-27 10:13 UTC
Requires
- php: 7.1.*|7.2.*|7.3.*|7.4.*|8.*
- dizatech/notifier: 0.*
- laravel/framework: 7.*|8.*
- morilog/jalali: 3.*
- va/cutlet-helper: 1.*
This package is auto-updated.
Last update: 2024-10-27 17:06:18 UTC
README
Laravel Identifier Package :: simple authentication (login, register and forgot-password).
How to install and config dizatech/identifier package?
⬇️ Installation
composer require dizatech/identifier
Publish Config file
php artisan vendor:publish --tag=dizatech_identifier
- Update (Be careful! Overwrites existing settings)
php artisan vendor:publish --tag=dizatech_identifier --force
Migrate tables, to add identifier tables to database
php artisan migrate
📖 How to change auth options
- Set the configs in /config/dizatech_identifier.php
Usage
- Create resources/sass/auth.scss file and add the following code :
// Fonts @import './fonts/awesome/awesome-font.css'; @import './fonts/iransans/iransans-font.css'; @import "./vendor/dizatech-identifier/dizatech_identifier";
- Please note that fonts directories is up to your project structure. change them with your own directories.
- Create resources/js/auth.js file and add the following code :
require('./bootstrap'); require("./vendor/dizatech-identifier/dizatech_identifier");
- Add created files directly in your webpack.mix.js
.js('resources/js/auth.js', 'public/js') .sass('resources/sass/auth.scss', 'public/css')
- run npm :
npm run dev
- Use this route to redirect your users to login and registration page
route('identifier.login');
- Change
app/Http/Middleware/Authenticate.php
like this :
protected function redirectTo($request) { if (! $request->expectsJson()) { return route('identifier.login'); } }
- Clear caches
php artisan cache:clear php artisan view:clear php artisan route:clear php artisan config:clear
- Done !
###Requirements :
- PHP v7.0 or above
- Laravel v7.0 or above
- dizatech/notifier package packagist link
- va/cutlet-helper package packagist link