lopatin96 / laravel-user-statuses
Laravel user statuses
Installs: 8 004
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=8.1
Requires (Dev)
- orchestra/testbench: ^8.0
README
Trait and Casts
Add HasUserStatus
trait and casts to User model.
use Atin\LaravelSocialAuth\Traits\HasUserStatus; class User extends Authenticatable { use HasUserStatus; protected $casts = [ 'status' => \Atin\LaravelUserStatuses\Enums\UserStatus::class, ];
Add EnsureUserIsNotBlocked middleware to middleware array in app/Http/Kernel.php:
protected $middlewareGroups = [ 'web' => [ … \Atin\LaravelUserStatuses\Http\Middleware\EnsureUserIsNotBlocked::class, ], ];
Run migrations:
php artisan migrate
Publishing
Migrations
php artisan vendor:publish --tag="laravel-user-statuses-migrations"
Localization
php artisan vendor:publish --tag="laravel-user-statuses-lang"