ashr / starter
Starter - Decouple function that is frequently used.
dev-master
2022-04-29 00:29 UTC
Requires
- php: ^8.0
- laravel/framework: ^9.9
This package is auto-updated.
Last update: 2025-03-20 13:05:45 UTC
README
ASHR STARTER PACKAGE is package contains function that is frequently used on laravel project.
Instalation
You can install the package via composer
composer require ashr/starter
Packagist: https://packagist.org/packages/ashr/starter
- Add
\Ashr\Starter\ServiceProvider::class
to config/app.php - Publish config if needed
php artisan vendor:publish --tag=ashr-starter
How to use
- Use middleware:
Route::post('/', [PostController::class, 'createPost'])->middleware('can-access:create-post');
create-post is permission need authorize to auth service - Customize error form request by extending class
Ashr\Starter\Services\Response\CustomFormRequest
- For formatting basic crud response use methods:
- responseCreated
- responseCreateFailed
- responseNotFound
- responseUpdated
- responseUpdateFailed
- responseDeleted
- responseDeleteFailed