https://github.com/chrispecoraro/mega-make
"php artisan make:all" for Laravel 5.5+
https://github.com/chrispecoraro/mega-make
controllers laravel laravel-5-package models scaffolding
Last synced: 7 months ago
JSON representation
"php artisan make:all" for Laravel 5.5+
- Host: GitHub
- URL: https://github.com/chrispecoraro/mega-make
- Owner: chrispecoraro
- Created: 2017-01-09T11:11:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-24T22:24:10.000Z (over 8 years ago)
- Last Synced: 2025-04-26T07:35:30.190Z (11 months ago)
- Topics: controllers, laravel, laravel-5-package, models, scaffolding
- Language: PHP
- Homepage:
- Size: 24.4 KB
- Stars: 10
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Megamake for Laravel
Laravel's `php artisan make:` on steroids
`artisan mega:make Department` produces:
```php
/**
* Display a listing of the Department resource.
*
* @return \Illuminate\Http\Response
*/
public function index(): ResourceCollection
{
return new DepartmentResourceCollection(Department::all());
}
/**
* Store a newly created Department resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request): Response
{
$input = $request->validate([
// TODO
// write validator
]);
$department = Department::create($input->toArray());
return response($department, 201);
}
```
The `mega:make` artisan command creates most of the various pieces of a Laravel 5.5 entity, adding boilerplate code and `//TODO`'s, giving you an extra boost, eliminating extra typing.
* A Model
* A Model Factory
* A Seeder
* A Migration
* A Resource Controller
* A Single API Resource
* An API Resource Collection
* A Test
Authors:
* [Christopher Pecoraro](https://github.com/chrispecoraro) - [@chris__pecoraro](https://twitter.com/chris__pecoraro)
* [Dylan De Souza](https://github.com/dylan-dpc) - [@DPC_22](https://twitter.com/dpc_22)
_This package was created in loving memory of my father, Dr. George Anthony Pecoraro._