Download the PHP package wronx/lumen-crud-generator without Composer
On this page you can find all versions of the php package wronx/lumen-crud-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wronx/lumen-crud-generator
More information about wronx/lumen-crud-generator
Files in wronx/lumen-crud-generator
Package lumen-crud-generator
Short Description Simple CRUD generation for Lumen
License WTFPL
Informations about the package lumen-crud-generator
Lumen CRUD Generator
IMPORTANT: This package is a work in progress, it it not stable by any means.
Use responsibly! Or don't use at all and wait for v1.0.
The purpose of this project
It was created to make creating simple Lumen APIs easier and faster, automating repeatable tasks.
Is it any good?
(well, it will be in stable version... I hope...)
Installation
-
Install the package with Composer:
-
Enable it in
bootstrap/app.php
: - Check if the
make:crud
command is present in the Artisan list.
Usage
php artisan make:crud myModelName [options]
The command always created CRUD controller for model, the rest depends on the provided options:
-r|--create-routes
adds CRUD routes to routes file-w|--use-middleware
uses RestObjectFetch middleware in controller and routes (see middleware page to learn more)-m|--create-model
for now it callsmake:model
command from Lumen Generator, hopefully it will be changed later-g|--create-migration
for now it callsmake:migration
command, hopefully it will be changed later-t|--create-tests
creates CRUD tests code (needs some editing inside the file!)
It creates separate CRUD
subdirectory for tests, so in order to use tests, you need to update TestCase
(or whatever your main class is) with Tests
namespace, which involves adding namespace Tests;
line on the top and leading slash before Laravel
in parent class name.
Contributing
If you want to contribute, please wait. Until stable version arrives I want to shape this package in my specific way. Later on, pull requests will be welcome.
License:
Copyright © 2016 github.com/WRonX
This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details