rjchauhan / laravel-finer
Laravel multi-purpose helpers
Installs: 1 670
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 4
Open Issues: 3
Requires
- php: ^8.2
- barryvdh/laravel-dompdf: ^2.1
- illuminate/support: ~5|~6|~7|~8|~9|~10|~11
- nesbot/carbon: ^2.72.2|^3.0
- spatie/laravel-activitylog: ^3.9|^4.8
Requires (Dev)
- laravel/pint: ^1.13
- mockery/mockery: ^1.6
- orchestra/testbench: ~3|~4|~5|~6|~7|~8|~9
- phpunit/phpunit: ^9.0
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2024-11-12 23:50:40 UTC
README
This package introduces set of multi-purpose helper classes that provides a new way of organising the logic of your Laravel applications.
Installation
You can install the package via composer:
$ composer require rjchauhan/laravel-finer
Usage
Action
Keep your Laravel applications DRY with single action classes.
use Rjchauhan\LaravelFiner\Action\Action; class DeactivateUser extends Action { protected function canBePerformed() { return $this->model->is_active; } protected function perform() { $this->model->is_active = false; $this->model->save(); } }
Usage
class UserActivationController extends Controller { public function deactivate(User $user) { $user = (new DeactivateUser($user))->execute(); return UserResource::make($user); } }
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email Raviraj Chauhan instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.