tripteki/laravelphp-user

Trip Teknologi's Laravel.php Users

1.1.8 2024-01-07 04:43 UTC

This package is auto-updated.

Last update: 2024-12-07 06:53:41 UTC


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() into register 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