mawuva / laravel-user-feature-set
A set of feature related to users
Requires
- php: ^7.4|^8.0
- doctrine/dbal: ^3.5
- mawuekom/laravel-password-history: ^1.5
- spatie/laravel-data: ^2.0
Requires (Dev)
- orchestra/testbench: ^7.13
- phpunit/phpunit: ^9.5
README
This packahe provide you with a set of features that you can use to enhance your work while working on the users management in your project.
Installation
You can install the package via composer:
composer require mawuva/laravel-user-feature-set
Usage
After installing the package, just run the following command:
php artisan user-feature-set:install
This command will install, setup and publish the package files in your project. It will also add two users in your database with the following credentials:
email: admin@admin.com
password: password
email: user@user.com
password: password
Features
This package will provide you the following features:
use Mawuva\UserFeatureSet\DataTransferObjects\StoreUserDTO; use Mawuva\UserFeatureSet\Facades\UserFeatureSet; $data = UserDTO::from([ "name" => "Test", "first_name" => "Test", "email" => "test@example.com", "password" => "password", ]) // Create a new user $user = UserFeatureSet::storeUserData($data); // Update the existing user data $user = UserFeatureSet::updateUserData($data); // Check user credentials $user = UserFeatureSet::checkUserCredentials("test@example.com"); // Change user password $id = "1" $user = UserFeatureSet::changeUserPassword($id, "password");
The table bellow show you the attributes that you can use in order to manipulate your user model.
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email seddorephraim7@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.