美文网首页
工作常用的 laravel artisan 命令

工作常用的 laravel artisan 命令

作者: HongXunPan | 来源:发表于2020-02-12 15:48 被阅读0次

总结工作中常用到的 laravel artisan 命令

laravel artisan 命令

module相关

  • 使用Game模块

    php artisan module:use Game
      
    Module [Game] used successfully.
    
  • 创建model

    php artisan module:make-model FinanceConfig
    
    Created : /Modules/Game/Entities/FinanceConfig.php
    

ide-helper 生成代码文档

 php artisan ide-helper:model Modules\\Game\\Entities\\FinanceConfig

 Do you want to overwrite the existing model files? Choose no to write to _ide_helper_models.php instead (yes/no) [no]:
 > yes

Written new phpDocBlock to /Modules/Game/Entities/FinanceConfig.php

laravel-admin 生成controller

    php artisan admin:make FinanceConfigController --model=Modules\\Game\\Entities\\FinanceConfig

App\Admin\Controllers\FinanceConfigController created successfully.

Add the following route to app/Admin/routes.php:

    $router->resource('finance-configs', FinanceConfigController::class);

相关文章

网友评论

      本文标题:工作常用的 laravel artisan 命令

      本文链接:https://www.haomeiwen.com/subject/knlcfhtx.html