您的位置:首页 > 编程语言 > PHP开发

钱包农场 API 开发手记 八 土豆

2018-04-08 00:00 204 查看

模型&数据库迁移

php artisan make:model PotatoLog -m
php artisan migrate

php artisan make:migration change_type_on_potato_settings_table --table=potato_settings


路由

// 土豆收支明细
$api->get('potatos', 'PotatoLogsController@index')
->name('api.potatos.index');


控制器

touch app/Transformers/PotatoLogTransformer.php
php artisan make:controller Api/V1/PotatoLogsController
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Laravel