Download the PHP package dev-lnk/laravel-code-builder without Composer
On this page you can find all versions of the php package dev-lnk/laravel-code-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dev-lnk/laravel-code-builder
More information about dev-lnk/laravel-code-builder
Files in dev-lnk/laravel-code-builder
Package laravel-code-builder
Short Description Generate classes and files from table schema
License MIT
Informations about the package laravel-code-builder
Generating laravel code from SQL table schema
Description
Hello Laravel users! This package allows you to generate code from the schema of your SQL table. The following entities will be generated:
These examples have been generated from a table created by migration:
What is this package for?
This package allows you to significantly reduce the routine while coding and focus on developing.
Installation
Configuration:
Publish the package configuration file:
Usage
The basic command signature looks like this:
Let's say we want to create classes for the base table users
based on the User
entity. To do this you need to run the following command:
You will be presented with a list of your tables, choose which table you want to generate the code based on:
You can also specify part of the table name to shorten the list
If you have not specified a generation_path
in the configuration file, you will be offered 2 options:
The first option will create all files according to the folders in your app_path
directory. If a file with the same name is found, you will be prompted to replace it:
In the second option, all files will be generated in the app/Generation
folder
In the builders
configuration you can comment out those builders that you do not want to be executed
You can generate certain entities using flags:
Available options for the only flag:
--model
--request
--DTO
--addAction
--editAction
--controller
--route
--form
--table
--typeScript
--builder
- Generates all builders specified in thebuilders
configuration + your specified flag, for example: