π¨Install
how to install laravel api auth builder on your project
it's straightforward to install the package on your current project using the composer
composer require 3x1io/laravel-auth-builderPublish Config File
you can publish the config by using this command
php artisan vendor:publish --provider="io3x1\LaravelAuthBuilder\LaravelAuthBuilderProvider" --tag="config"to can set the default setting for the
io3x1\LaravelAuthBuilder\Services\BuildAuthClass
return [
'guard' => 'web',
'otp' => false,
'model' => 'App\Models\User',
'login_by' => 'email',
'login_type' => 'email',
'validation' => [
'create' => [
'name' => 'required|string|max:255',
'email' => 'required|email|max:255',
'password' => 'required|confirmed|min:6|max:191',
],
'update' => [
'name' => 'sometimes|string|max:255',
'email' => 'sometimes|email|max:255',
'password' => 'sometimes|confirmed|min:6|max:191',
],
],
];Setup Your Model
to make your model accept the auth you must make it extend
like exists App\Models\User
and set some traits to it like
Last updated
Was this helpful?