dizatech/identifier

v1.8.7 2021-09-27 10:13 UTC

README

Latest Version on Packagist GitHub issues GitHub stars GitHub forks Total Downloads GitHub license

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 :