Laravel 5 / Lumen Code Generator

18. May 2015 Blog 0

So when I first started using MVC frameworks in PHP the first framework I really dove into was Yii. One of the coolest things about Yii is they have a code generator called Gii. Gii would look at your database and create Models, Controllers, and even Views for basic CRUD automatically. Laravel has something similar which is `php artisan make:model` however the code in the files is super basic. So I wanted to make something a little better. So far I have model files being created successfully, however I want to add a few more features like:

  • Auto detect soft delete
  • Auto detect and build relationships

I would also like to eventually also add the option to generate Controllers and possibly some views. You can find the code for it here:

https://github.com/pitchinnate/laravelGenerator

I need to learn composer a little better so that this can just be auto installed with composer, but that is a task for another day.


Leave a Reply

Your email address will not be published. Required fields are marked *