代碼: 選擇全部
https://github.com/JeffreyWay/Laravel-4-Generators
'providers' => array(
add
代碼: 選擇全部
'Way\Generators\GeneratorsServiceProvider'
代碼: 選擇全部
php artisan generate:scaffold post --fields="title:string,content:text"
ontent:text"
Do you want me to create a Post model? [yes|no] yes
Created: D:\UwAmp\www\laravel\app/models/Post.php
Do you want me to create views for this Post resource? [yes|no] yes
Created: D:\UwAmp\www\laravel\app/views/posts/index.blade.php
Created: D:\UwAmp\www\laravel\app/views/posts/show.blade.php
Created: D:\UwAmp\www\laravel\app/views/posts/create.blade.php
Created: D:\UwAmp\www\laravel\app/views/posts/edit.blade.php
Do you want me to create a PostsController controller? [yes|no] yes
Created: D:\UwAmp\www\laravel\app/controllers/PostsController.php
Do you want me to create a 'create_posts_table' migration and schema for this re
source? [yes|no] yes
Created: D:\UwAmp\www\laravel\app/database/migrations/2014_11_02_125753_create_p
osts_table.php
Generating optimized class loader
Compiling common classes
Compiling views
Would you like a 'Posts' table seeder? [yes|no] yes
Created: D:\UwAmp\www\laravel\app/database/seeds/PostsTableSeeder.php
Do you want to go ahead and migrate the database? [yes|no] yes
**************************************
* Application In Production! *
**************************************
Do you really wish to run this command? yes
[PDOException]
could not find driver
generate:scaffold [--fields[="..."]] resource