thesoftpulze / laravibe-standards
Standard conventions, structure, and tooling for Laravel apps built the LaraVibe way.
Package info
github.com/thesoftpulze/laravibe-standards
pkg:composer/thesoftpulze/laravibe-standards
Fund package maintenance!
Requires
- php: ^8.4
- illuminate/support: ^13.0
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/pao: ^1.0
- laravel/pint: ^1.29
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.6
- pestphp/pest-plugin-laravel: ^4.1
- pestphp/pest-plugin-type-coverage: ^4.0
- phpstan/extension-installer: ^1.4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Laravibe Standards
Conventions, generators and base classes for Laravel apps built the LaraVibe way.
Made by The SoftPulze
Features
- Actions:
make:actiongenerates single-purpose action classes inapp/Actions, with an optional test. - DTOs:
make:dtoand theAsDTOtrait for immutable, typed DTOs. See the DTO guide. - Enums: the
HasEnumMetadatatrait adds labels, options and validation helpers. See the enum guide. - Resources:
AppResourceandAppResourceCollectionwith field helpers for API and Inertia responses. See the resource guide. - Stubs for
make:action,make:dto,make:enumandmake:resource. - Laravel Boost guideline and skills for AI agents.
Installation
Requires PHP 8.4+ and Laravel 13+.
composer require thesoftpulze/laravibe-standards
php artisan vendor:publish --tag="laravibe-standards-stubs"
The stubs are published to the application's stubs directory. Without them, make:enum and make:resource generate plain Laravel classes.
Upgrading from softpulze/laravibe-standards? Require thesoftpulze/laravibe-standards instead and rename SoftPulze\LaravibeStandards imports to TheSoftPulze\LaravibeStandards.
Usage
Actions
php artisan make:action Account/UpdateProfileAction --pest
final readonly class UpdateProfileAction { public function handle(User $user, UpdateProfileDTO $data): User { $user->update($data->toEloquent()); return $user; } }
Pass --test, --pest or --phpunit to also generate a test in tests/Feature/Actions.
DTOs
php artisan make:dto Account/UpdateProfileDTO
final readonly class UpdateProfileDTO implements Arrayable, Jsonable { use \TheSoftPulze\LaravibeStandards\DTOs\Concerns\AsDTO; public function __construct( public string $name, public ?string $bio = null, ) {} } $dto = UpdateProfileDTO::from($request); $dto->toArray(); $dto->toEloquent(); $dto->with(['bio' => 'Senior Dev']);
Enums
php artisan make:enum ToastType --string
enum ToastType: string { use \TheSoftPulze\LaravibeStandards\Enums\Concerns\HasEnumMetadata; case Success = 'success'; case Error = 'error'; } ToastType::options(); ToastType::values(); ToastType::Success->label();
Resources
php artisan make:resource UserResource
final class UserResource extends \TheSoftPulze\LaravibeStandards\Resources\AppResource { public function toArray(Request $request): array { return [ $this->id(), $this->attribute('name'), ...$this->timestamps(), ]; } } return inertia('users/Show', ['user' => UserResource::make($user)->toInertia()]);
AI Agents
php artisan boost:install
When prompted for third-party packages, select thesoftpulze/laravibe-standards to install the action, DTO, enum and resource guidelines. Run php artisan boost:update after updating the package.
Changelog
See CHANGELOG for recent changes.
Contributing
See the contributing guide and security policy.
Credits
Laravibe Standards is developed and maintained by The SoftPulze.
- Ashok Barua, creator and maintainer
- All contributors
Built on Laravel.
License
Laravibe Standards is open-source software licensed under the MIT license. Copyright © 2025-present The SoftPulze.