Skip to content

Commit b968a50

Browse files
committed
Init commit
0 parents  commit b968a50

34 files changed

+10349
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
vendor
2+
.idea
3+
.DS_Store

LICENSE

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Ravaelles <ravaelles@gmail.com>
4+
5+
This package is extension/modification of https://github.com/laralib/l5scaffold
6+
Copyright (c) 2014 Fernando <fernandobritofl@gmail.com>
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in
16+
all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
THE SOFTWARE.

composer.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "Ravaelles/laravel5-scaffold",
3+
"description": "Laravel 5 scaffold that provides easy MongoDB (schemaless) support.",
4+
"keywords": ["laravel", "generators", "scaffold", "laravel5", "mongodb"],
5+
"license": "MIT",
6+
"minimum-stability": "dev",
7+
"authors": [
8+
{
9+
"name": "Rafal Poniatowski",
10+
"email": "ravaelles@gmail.com"
11+
}
12+
],
13+
"require": {
14+
"php": ">=5.5.9",
15+
"illuminate/support": "~5.0"
16+
},
17+
"autoload": {
18+
"psr-4": {
19+
"Ravaelles\\Laravel5Scaffold\\": "src/"
20+
}
21+
}
22+
}

composer.lock

+235
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readme.md

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Laravel 5.2 Scaffold Generator
2+
3+
4+
Hi, this is a scaffold generator for Laravel 5.2. (Laravel scaffold for Laravel 5.1? change branch to laravel-5.1 )
5+
6+
7+
8+
## Usage
9+
10+
### Step 1: Install Through Composer
11+
12+
```
13+
composer require 'laralib/l5scaffold' --dev
14+
```
15+
16+
### Step 2: Add the Service Provider
17+
18+
Open `config/app.php` and, to your **providers** array at the bottom, add:
19+
20+
```
21+
"Ravaelles\Laravel5Scaffold\GeneratorsServiceProvider"
22+
```
23+
24+
### Step 3: Run Artisan!
25+
26+
You're all set. Run `php artisan` from the console, and you'll see the new commands `make:scaffold`.
27+
28+
## Examples
29+
30+
31+
```
32+
php artisan make:scaffold Tweet --schema="title:string:default('Tweet #1'), body:text"
33+
```
34+
This command will generate:
35+
36+
```
37+
app/Tweet.php
38+
app/Http/Controllers/TweetController.php
39+
database/migrations/2015_04_23_234422_create_tweets_table.php
40+
database/seeds/TweetTableSeeder.php
41+
resources/views/layout.blade.php
42+
resources/views/tweets/index.blade.php
43+
resources/views/tweets/show.blade.php
44+
resources/views/tweets/edit.blade.php
45+
resources/views/tweets/create.blade.php
46+
```
47+
And don't forget to run:
48+
49+
```
50+
php artisan migrate
51+
```
52+
53+
### Other Examples (new)
54+
55+
Same as above with use of the prefix. It will create the prefix in redirects of controller and the links of views (v1.0.7):
56+
```
57+
php artisan make:scaffold Tweet --schema="title:string:default('Tweet #1'), body:text" --prefix="admin"
58+
```
59+
Create the empty scaffold views, controller, seed, migration and model (v1.0.6):
60+
```
61+
php artisan make:scaffold Tweet
62+
```
63+
Create the empty scaffold (with prefix) views, controller, seed, migration and model (v1.0.7):
64+
```
65+
php artisan make:scaffold Tweet --prefix="admin"
66+
```
67+
68+
## Scaffold
69+
![image](http://i62.tinypic.com/11maveb.png)
70+
![image](http://i58.tinypic.com/eqchat.png)
71+
![image](http://i62.tinypic.com/20h7k8n.png)
72+
73+
###Data type Date (on view)
74+
![image](http://i65.tinypic.com/29wooxl.png)
75+
76+
###Data type Boolean (on view)
77+
![image](http://i65.tinypic.com/afehl5.jpg)
78+
79+
80+
81+
82+
# Todo task list
83+
1 - Validations
84+
85+
2 - Support a Localization
86+
87+
3 - More fields type
88+
89+
4 - Default tests file
90+
91+
5 - sass and js with gulp
92+
93+
**Send us your ideas.** (send message to @fernandobritofl (Twitter))
94+
95+
96+
<br/><br/>
97+
##Collaborators
98+
[Fernando Brito](https://github.com/fernandobritofl "fernandobritofl")
99+
<br/>[Sylvio Tavares](https://github.com/sylviot "Sylviot")
100+
<br/>[Raphael Heitor](https://github.com/raphaelheitor "raphaelheitor")
101+
<br/>[Alfred Nutile](https://github.com/alnutile "alnutile")
102+
<br/>[Sazzad Hossain Khan](https://github.com/itsazzad "itsazzad")
103+
<br/>[Alexander Makhaev](https://github.com/mankms "mankms")
104+
<br/>[Adam Brown](https://github.com/DeftNerd "DeftNerd")
105+
<br/>[TJ Webb](https://github.com/webbtj "webbtj")
106+
<br/>[Tsaganos Tolis](https://github.com/Dev-Force "Dev-Force")

0 commit comments

Comments
 (0)