Download the PHP package kindharika/laravel-api-starter without Composer
On this page you can find all versions of the php package kindharika/laravel-api-starter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-api-starter
Laravel API Starter
A Laravel package that brings the best of the laravel-template API architecture into a reusable, modern, and maintainable form. Supports Laravel 11.x, 12.x, and 13.x.
Features
- UUID-based models out of the box (v4 by default, configurable)
- Unified JSON response envelope with pagination metadata
- Service layer pattern (BaseService, BaseServiceInterface)
- Base API Controller (BaseApiController)
- Datatable macro (search, sort, filter, date-range on Eloquent Builder)
- Firebase Cloud Messaging (FCM) infrastructure (Channel, Notification, Trait)
- Artisan scaffold generators (model, service, controller, request, migration, resource)
- Auto-discovery via Composer extras
Installation
Or add via path repository for local development:
Publish Config
Usage
Base classes
Your models should extend BaseModel:
Your controllers should extend BaseApiController:
Your services should extend BaseService and implement BaseServiceInterface:
Datatable macro
Once installed, the macro is available on any query builder:
Scaffolding
Generate a full resource scaffold with one command:
This generates:
app/Models/Post.phpapp/Http/Controllers/PostController.phpapp/Http/Requests/Post/StorePost.phpapp/Http/Requests/Post/UpdatePost.phpapp/Services/Post/PostService.phpapp/Services/Post/PostServiceInterface.phpapp/Http/Resources/PostResource.php- Database migration
Or generate individually:
Firebase Notification
Use the trait in your service or notification class:
Configuration
config/api-starter.php:
Upgrading from Template
If you were previously using the laravel-template as-is, migrate by:
composer require kindharika/laravel-api-starter- Replace
AppModelwithKindharika\ApiStarter\Base\BaseModel - Replace
AppAuthenticatablewithKindharika\ApiStarter\Base\BaseAuthenticatable - Replace
AppServicewithKindharika\ApiStarter\Base\BaseService - Replace
ApiControllerwithKindharika\ApiStarter\Base\BaseApiController - Replace
ResponseServicewithKindharika\ApiStarter\Base\ResponseService - Remove
DatatableServiceProvider— the macro is registered automatically now - Use
api:scaffoldto generate new resources instead of manual stubs
License
MIT
All versions of laravel-api-starter with dependencies
illuminate/support Version ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^11.0 || ^12.0 || ^13.0
illuminate/console Version ^11.0 || ^12.0 || ^13.0
ramsey/uuid Version ^4.0