zoukankan      html  css  js  c++  java
  • 订单系统开发01

    创建项目

    laravel new ordersys
    

    迁移数据库文件

    php artisan migrate
    

    设置数据库

    相关表格

    1、产品表(products)
        name
        price
    2、订单表(orders)
        products_id
        attributes_id
        num(数量)
        amount(总金额)
        city(地区)
        address
        paymethod
        remark(备注)
        ifpayed
            - false 未付款
            - true  已付款
        status
            - 0 未发货
            - 1 已发货
            - 2 已完成
            - 3 被拒收
    3、图片表(imgs)
        products_id
        name
        imgaddress
        imginfo
    4、类目(categorys)
        name
        value
    5、特征(attributes)
        name
        value
    6、客户表(customers)
        name
        phone
        address
    7、库存(stocks)
        products_id
        attributes_id
        sum(总量)
        saled(已经卖出)
        balance(剩余)
    8、物流信息(logistics)
        orders_id
        lognumber
        loginfo
        status
            - 0 运输中
            - 1 已签收
            - 2 拒收
            - 3 已退回
    

    创建相关表格

    php artisan make:migration create_products_table --create=products
    php artisan make:migration create_orders_table --create=orders
    php artisan make:migration create_imgs_table --create=imgs
    php artisan make:migration create_categorys_table --create=categorys
    php artisan make:migration create_attributes_table --create=attributes
    php artisan make:migration create_customers_table --create=customers
    php artisan make:migration create_stocks_table --create=stocks
    php artisan make:migration create_logistics_table --create=logistics
    

    设置相关属性

     public function up()
        {
        Schema::create('products', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->decimal('price',5,2);
            $table->timestamps();
        });
        }
    

    迁移数据库

    php artisan migrate:reset
    

    创建注册/登录验证试图

    php artisan make:auth
  • 相关阅读:
    win7下的nginx小demo
    破解navicat
    MVC下用C#实现Excel导出
    使用IE10登录,URL出现SessionId的解决办法
    C#错误:The Controls collection cannot be modified
    更改数据库排序规则
    windows server 2008 r2电脑历史操作记录
    jquery easyui无法绑定下拉框内容
    Jquery实现自动提示下拉框
    CLSID {91493441-5A91-11CF-8700-00AA0060263B}错误
  • 原文地址:https://www.cnblogs.com/shamojituan/p/6384885.html
Copyright © 2011-2022 走看看