Download the PHP package gesirdek/app-creator without Composer
On this page you can find all versions of the php package gesirdek/app-creator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gesirdek/app-creator
More information about gesirdek/app-creator
Files in gesirdek/app-creator
Package app-creator
Short Description Laravel Framework code generation.
License MIT
Informations about the package app-creator
App-Creator
App-Creator is a collection of Laravel Components which aim is to create Laravel 5.6 and Vue2 application from database.
How does it work?
This package expects that you are using Laravel 5.6+ and already have a fresh Laravel installation with a database that has tables with Laravel naming convention.
Then
You will need to import the app-creator
package via composer:
Configuration
Add the service provider to your config/app.php
file within the providers
key:
Configuration for local environment only
If you wish to enable generators only for your local environment, you should install it via composer using the --dev option like this:
Then you'll need to register the provider in app/Providers/AppServiceProvider.php
file.
Models
Add the models.php
configuration file to your config
directory.
Admin Panel
Add this to your routes.php or web.php depending on your laravel verison.
Database Creation
To be able to create project from database, consider below for database design.
- Table names need to be plural form except pivot table names.
- Pivot table names must include both tables' name as singular form.
- To implement modular design, add module name to table comment. If you need to add a comment to any table, add double semicolon (;;) before your comment.
To be able to use modular design, add nWidart package
After that add modules directory ("Modules\\": "Modules/"
) to composer.json
After that run composer dumpautoload
Usage
Assuming you have already configured your database, you are now all set to go.
- Let's scaffold some of your models from your default (mysql) connection.
If you are using POSTGRESQL
Then run
Thats it! Your admin panel with DB CRUD's is ready under /admin !
Customizing Model Scaffolding
To change the scaffolding behaviour you can make config/models.php
configuration file
fit your database needs.
Tips
1. Keeping model changes
You may want to generate your models as often as you change your database. In order
not to lose you own model changes, you should set base_files
to true
in your config/models.php
.
When you enable this feature your models will inherit their base configurations from base models. You should avoid adding code to your base models, since you will lose all changes when they are generated again.
Note: You will end up with to models for the same table and you may think it is a horrible idea to have two classes for the same thing. However, it is up to you to decide whether this approach gives value to your project :-)
Support
For the time being, this package supports Postgre and MYSQL database.
All versions of app-creator with dependencies
doctrine/dbal Version ~2.5
illuminate/support Version ~5.1
illuminate/database Version ~5.1
illuminate/contracts Version ~5.1
illuminate/filesystem Version ~5.1
illuminate/console Version ~5.1