zoukankan      html  css  js  c++  java
  • laravel-artisan命令

    1 查看版本信息
    php artisan --version
    OR vim vendor/laravel/framework/src/Illuminate/Foundation/Application.php
     
    生成模型:
    php artisan make:model -m Models/Post
    创建Tag模型同时生成tags数据库迁移:
    php artisan make:model Models/Tag --migration
    创建模型工厂文件:
    php artisan make:factory PostFactory --model=Models/Post
    创建新的填充类文件:
    php artisan make:seeder PostsTableSeeder
    创建控制器:
    php artisan make:controller BlogController
    创建控制器并生成路由:
    php artisan make:controller Admin/TagController --resource
     
    laravel 清除缓存命令操作
    清除编译缓存 php artisan clear-compiled
    清除数据缓存 php artisan cache:clear
    清除配置缓存 php artisan config:clear
    清除路由缓存 php artisan route:clear
     
    生成队列表:
    php artisan queue:table
    php artisan migrate
     
    数据迁移指令
    生成迁移文件,
    创建标签tag与文章post多对多关系:
    php artisan make:migration create_post_tag_pivot --create=post_tag_pivot
    创建请求类:
    php artisan make:request TagCreateRequest
    创建目录软连接:
    php artisan storage:link
    创建邮箱类:
    php artisan make:mail TestMail
     
    运行数据库迁移指令:
    php artisan migrate
    数据库填充命令:
    php artisan db:seed
     

  • 相关阅读:
    手动添加 memcached.jar包
    easyui返回数据类型
    负载均衡
    nginx负载均衡
    nginx配置文件详解
    Js操作Select大全(取值、设置选中)
    jQuery select的操作代码
    jQuery对Select操作大集合
    PHP+AJAX无刷新返回天气预报
    一个好用的PHP验证码类
  • 原文地址:https://www.cnblogs.com/sien6/p/13781631.html
Copyright © 2011-2022 走看看