LaraUtilX v1.5.1 Release Notes

API CRUD Generator

Version 1.5.1 introduces the make:crud Artisan command, a full API CRUD scaffold generator. It gives you production-ready Model, Controller, and Migration files in a single command, fully customisable through publishable stubs.

What's New

  • make:crud command — Scaffold a complete API resource with one Artisan command
  • Field definitions — Comma-separated column:type:validation with support for all common column types
  • Relationships--belongs-to, --has-many, --has-one, --belongs-to-many with correct migrations and model methods
  • Soft deletes--soft-deletes adds trait and migration column
  • Search & sort--searchable fields and ?sort_by / ?sort_direction in the generated controller
  • Smart validation — Custom messages for exists/unique, and unique rules that ignore the current record on update
  • Relationship warnings — Command warns at generation time if related tables are missing
  • Publishable stubs — Override migration, model, and controller stubs via --tag=lara-util-x-stubs

See the API CRUD Generator documentation for full details, options, and examples.

Bug Fixes

Issue Fix
Duplicate LLMProviderInterface binding in LaraUtilXServiceProvider Removed the second redundant binding that referenced a non-existent OpenAIProviderInterface

Tests

44 new unit tests were added under tests/Unit/Console/MakeCrudCommandTest.php covering command registration, migration generation, model generation (fillable, casts, relationships, soft deletes), controller generation (validation, search, pagination, messages), --register-routes, --migrate, and relationship warnings.

Run the CRUD generator tests from the package directory:

cd packages/omarchouman/lara-util-x
./vendor/bin/phpunit tests/Unit/Console/MakeCrudCommandTest.php

Files Added / Modified

Path Status
src/Console/Commands/MakeCrud.php Added
stubs/crud.migration.stub Added
stubs/crud.model.stub Added
stubs/crud.controller.stub Added
tests/Unit/Console/MakeCrudCommandTest.php Added
src/LaraUtilXServiceProvider.php Modified — registers command, publishes stubs, removes duplicate binding
src/Http/Controllers/CrudController.php Retained — abstract base class kept for manual use