dev-master
9999999-devLaravel Crud Generator
MIT
The Requires
The Development Requires
by Muhammad Syifa
dev-develop
dev-developLaravel Crud Generator
MIT
The Requires
The Development Requires
by Muhammad Syifa
Wallogit.com
2017 © Pedro Peláez
Laravel Crud Generator
LaraSpell is Laravel CRUD generator that generate laravel code. So you can modify generated files as you need, without limitation. And all you need to customize it is just some PHP and Laravel knowledges., (*1)
Run composer command below to install laraspells/generator:, (*2)
composer require "laraspells/generator"
Now open config/app.php, add LaraSpells\Generator\LaraSpellServiceProvider::class to 'providers' section., (*3)
Run this command to make a schema:, (*4)
php artisan spell:make admin
This command will generate admin.yml into your project directory., (*5)
Open admin.yml, modify as you needs. Look at schema section for more detail about schema., (*6)
Run this command, (*7)
php artisan spell:generate admin
Now you can use it by adding generated service provider to your config/app.php file., (*8)
---
name: Schema Name # Schema name (for now it's just for information, not used to generate anything)
template: vendor/laraspells/generator/template # Template directory
author:
name: Author Name # Author name (used for generated PHP classes)
email: author@email.example # Author email
config_file: admin # Config file to store 'menu' and 'repositories' configuration
upload_disk: uploads # Upload disk to store uploaded files
provider:
file: app/Providers/AdminServiceProvider.php # Provider class filepath
class: App\Providers\AdminServiceProvider # Provider class name
controller:
path: app/Http/Controllers # Path to store generated controller files
namespace: App\Http\Controllers # Controller class namespace
request:
path: app/Http/Requests # Path to store generated requests files
namespace: App\Http\Requests # Requests class namespace
model:
path: app/Models # Path to store model files
namespace: App\Models # Model class namespace
repository:
path: app/Repositories # Path to store repository files
class: App\Repositories # Repository class/interface namespace
view:
path: resources/views # Path to store view files
namespace: "" # View namespace
route:
file: routes/web.php # Path to routes file
name: admin:: # Route group name
prefix: admin # Route prefix
tables: # - List tables -
todos: # Table 'todos' schema
plural: todos # [optional] Plural name
singular: todo # [optional] Singular name
label: Todo # Crud label
icon: fa-list # Icon class
fields: # List fields
title: # Field 'title' schema
type: string # Field type (for migration)
label: Title # Field label
length: 80 # [optional] Field length
input: text # Field input type (string|assoc)
rules: # Field rules
- required
description:
type: text
label: Description
input: textarea
rules:
- required
status:
type: enum:waiting,progress,done # Field type with parameters
label: Status
input: # Field input type using assoc (with input parameters)
type: radios
options:
waiting: Waiting
progress: On Progress
done: Done
rules:
- required
- in:waiting,progress,done
Laravel Crud Generator
MIT
Laravel Crud Generator
MIT