jeffersongoncalves/laravel-user

Base authenticatable User model, migration, factory and observer shared by the jeffersongoncalves Laravel starter kits.
1,374 1
Install
composer require jeffersongoncalves/laravel-user
Latest Version:1.0.1
PHP:^8.2
License:MIT
Last Updated:Sep 29, 2026
Links: GitHub  ·  Packagist
Maintainer: jeffersongoncalves

Laravel User

Laravel User

Base authenticatable User model, migration, factory and observer shared by the jeffersongoncalves Laravel starter kits.

Your app keeps its own App\Models\User and simply extends the package model, so columns, casts, factory and observer live in one place and every kit gets fixes through composer update.

Installation

composer require jeffersongoncalves/laravel-user

Publish and run the migration (skip it if your app already has a users table with the same columns):

php artisan vendor:publish --tag="laravel-user-migrations"
php artisan migrate

Usage

namespace App\Models;

use JeffersonGoncalves\User\Models\User as BaseUser;

class User extends BaseUser
{
    // add traits, relations or overrides here
}

config/auth.php keeps pointing the users provider to App\Models\User.

What the base model gives you:

Feature Details
Columns status, name, email, email_verified_at, password, remember_token, avatar_url, custom_fields, locale, theme_color
Casts password hashed, status boolean, custom_fields array, email_verified_at datetime
Contracts Authenticatable, Authorizable, CanResetPassword, MustVerifyEmail, Notifiable
Factory User::factory() with unverified() and inactive() states. It creates the model set in auth.providers.users.model, so App\Models\User::factory() works without a factory in your app
Observer Clears the users_count cache key on create/delete (inherited by subclasses)

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

jeffersongoncalves/filament-user

Filament User model, UserResource, status-aware Login page and plugin for the je...

1,293 2
jbruni/larauth

Authentication and Authorization Services for Laravel 4

30 7
sarav/laravel-multiauth

A Simple Laravel Package for handling multiple authentication

31,297 50
lab404/laravel-auth-checker

Laravel Auth Checker allows you to log users authentication, devices authenticat...

169,000 222
helori/laravel-permission

Define roles and permissions for Laravel users

69 0

Version History

Version Released PHP Laravel License
1.0.1 ^8.2 ^12.61.1|^13.12.0 MIT
1.0.0 ^8.2 ^11.0|^12.0|^13.0 MIT