tripteki / laravelphp-user
Trip Teknologi's Laravel.php Users
1.1.8
2024-01-07 04:43 UTC
Requires
- php: ^8.0.2
- tripteki/laravelphp-adminer: ^1.0.0
- tripteki/laravelphp-helpers: ^1.0.0
- tripteki/laravelphp-import-export: ^1.0.0
- tripteki/laravelphp-repository: ^1.0.0
- tripteki/laravelphp-request-response-query: ^1.0.0
Suggests
- laravel/framework: Required when using laravel framework (^9.0).
- laravel/lumen-framework: Required when using lumen framework (^9.0).
README
This package provides implementation of user in repository pattern for Lumen and Laravel besides REST API starterpack of admin management with no intervention to codebase and keep clean.
Getting Started
Installation :
composer require tripteki/laravelphp-user
How to use it :
-
Put
Tripteki\User\Providers\UserServiceProvider
to service provider configuration list. -
Put
Tripteki\User\Providers\UserServiceProvider::ignoreMigrations()
intoregister
provider, then publish migrations file into your project's directory with running (optionally) :
php artisan vendor:publish --tag=tripteki-laravelphp-user-migrations
- Migrate.
php artisan migrate
- Sample :
use Tripteki\User\Contracts\Repository\Admin\IUserRepository as IUserAdminRepository; $userAdminRepository = app(IUserAdminRepository::class); // $userAdminRepository->create([ "name" => "...", "email" => "...", "password" => "...", ]); // // $userAdminRepository->delete("identifier"); // // $userAdminRepository->update("identifier", [ "name" => "...", "email" => "...", "password" => "...", ]); // // $userAdminRepository->get("identifier"); // // $userAdminRepository->all(); //
- Generate swagger files into your project's directory with putting this into your annotation configuration (optionally) :
base_path("app/Http/Controllers/Admin/User")
Usage
php artisan adminer:install:user
and put App\Console\Commands\GenerateUserCommand::class
to register kernel.
php artisan adminer:generate:user
Author
- Trip Teknologi (@tripteki)
- Hasby Maulana (@hsbmaulana)