tripteki / laravelphp-log
Trip Teknologi's Laravel.php Logs
Requires
- php: ^8.0.2
- spatie/laravel-activitylog: ^4.8.0
- 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 Auth Activity Log 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-log
How to use it :
-
Read detail optional instruction here Log.
-
Put
Tripteki\Log\Traits\LogTrait
to any of your model loggable then optionally you can configureprotected static
of$recordName
,$recordEvents
, and$recordLists
. -
Put
Tripteki\Log\Providers\LogServiceProvider
to service provider configuration list. -
Put
Tripteki\Log\Providers\LogServiceProvider::ignoreConfig()
intoregister
provider, then publish config file into your project's directory with running :
php artisan vendor:publish --tag=tripteki-laravelphp-log
- Put
Tripteki\Log\Providers\LogServiceProvider::ignoreMigrations()
intoregister
provider, then publish migrations file into your project's directory with running (optionally) :
php artisan vendor:publish --tag=tripteki-laravelphp-log-migrations
- Migrate.
php artisan migrate
- Publish tests file into your project's directory with running (optionally) :
php artisan vendor:publish --tag=tripteki-laravelphp-log-tests
- Sample :
use Tripteki\Log\Contracts\Repository\Admin\ILogRepository as ILogAdminRepository; use Tripteki\Log\Contracts\Repository\ILogRepository; $logAdminRepository = app(ILogAdminRepository::class); // $logAdminRepository->get(5); // // $logAdminRepository->all(); // $repository = app(ILogRepository::class); // $repository->setUser(...); // // $repository->getUser(); // // $repository->archive(5); // // $repository->unarchive(5); // // $repository->get(5); // // $repository->all(); //
- Generate swagger files into your project's directory with putting this into your annotation configuration (optionally) :
base_path("app/Http/Controllers/Log")
base_path("app/Http/Controllers/Admin/Log")
Usage
php artisan adminer:install:log
Author
- Trip Teknologi (@tripteki)
- Hasby Maulana (@hsbmaulana)