Download the PHP package tgozo/laravel-codegen without Composer
On this page you can find all versions of the php package tgozo/laravel-codegen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tgozo/laravel-codegen
More information about tgozo/laravel-codegen
Files in tgozo/laravel-codegen
Package laravel-codegen
Short Description A Laravel Code Generator to help you get started with a lot of staff including generating Migrations, Models, Controllers, Factories, Routes, Views, Database Seeders and Request Validation Rules.
License MIT
Informations about the package laravel-codegen
Laravel-codegen
This package generates code for you. It is capable of creating Migrations, Models, Controllers, Factories, Routes, Views, Database Seeders and PestPhp Tests.
All these come with pre-populated code
For each Route, a PestPhp Test will be created to make sure it can be accessed.
Important Note
This package is still in beta. Therefore, I recommend testing your application thoroughly before using it in production.
Requirements
- PHP >= 8.1
- Laravel >= 10
Installing
You can install the package via composer:
Usage
To create a migration. Execute the following command from the root of your Laravel project
Notes
- At least 1 field should be specified.
- You can add the options
-m
,-c
,-s
,-f
to the command so that a Model, a Controller, a Seeder and a Factory can be created respectively. - To create a Migration, Model, Controller, Seeder and a Factory. Execute the command
- The option
--all
can be used so that when the Migration is created, a Model, a Controller, a Database Seeder, a Factory and Routes & Views to be used withing the controller are created - When a Controller is created, necessary Routes are added to the
routes/web.php
file and the necessary views are added to theresources/views
directory. - For each Route, a PestPhp Test will be created to make sure it can be accessed.
- The migration names should follow certain patterns.
As we can see from the above migration name, it starts with create_
and ends with _table
. More patterns will be shared as features are rolled out.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The MIT License (MIT). Please see License File for more information.