Commit 30ac0d73 by Angel MAS

field coupon

parent afb6793d
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddCouponToSaleShopTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('sale_shops', function (Blueprint $table) {
$table->string('coupon')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('sale_shops', function (Blueprint $table) {
$table->dropColumn('coupon');
});
}
}
......@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
class SaleShop extends Model
{
protected $table = 'sale_shops';
protected $fillable = ['status', 'total', 'client_id', 'transaction_id', 'payment_type', 'shipping_status'];
protected $fillable = ['status', 'total', 'client_id', 'transaction_id', 'payment_type', 'shipping_status', 'coupon'];
public function client()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment