laravel Auth presets

V1.2 2025-05-17 10:16 UTC

This package is auto-updated.

Last update: 2025-05-17 10:20:00 UTC


README

laravel-livewire/auth-ui library base on PHP Laravel framework, contains Auth presets (Login, Register, Forget passwork, Ask for help) development by "samer tawil" eng.samertawil@gmail.com

Installation

You can install the package via composer:

composer require laravel-livewire/auth-ui

Register package by add provider services in bootstrap folder

 uilogin\pkg\UiloginServiceProvider::class, 
 return [
    ...
    uilogin\pkg\UiloginServiceProvider::class,
];

publish :

php artisan vendor:publish --provider="uilogin\pkg\UiloginServiceProvider" 
Attention, overwrite User model if you not customize it
php artisan vendor:publish --provider="uilogin\pkg\UiloginServiceProvider"  --force  --tag=userModel

or add these lines

 return [
    ...
       protected $fillable = 
    [ 'name', 'email', 'password', 'user_name', 'mobile', 'user_type', 'user_activation', 'status_id', 'need_to_change',];

       public static function user($user_name) {
       return  $user = User::where('user_name', $user_name)->first();
    }
];

After publishing the migration you can create the tables by running the migrations:

php artisan migrate

Seed db to insert questions to recovery_questions table

php artisan db:seed RecoveryQuestionsSeeder

Including uiauth route file to web.php

include __DIR__.'/uiauth.php';

Register middleware to localize the browser language

->withMiddleware(function (Middleware $middleware) {
        $middleware->append(UiloginBrowserLocale::class);
   }) 
  • add your custome page name to redirect when logout in [config/uilogin.php - 'redirectRoute' key]
  • Url to start:

http://servername/login

  • note : if you have localize prefix ypu should use this code in web.php

    Livewire::setUpdateRoute(function ($handle) { return Route::post('/livewire/update', $handle); });

    License

    This package is distributed under the MIT License. Please see the LICENSE file for more information.