Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
onestartup-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Angel Martin
onestartup-shop
Commits
30ac0d73
Commit
30ac0d73
authored
Jun 01, 2018
by
Angel MAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
field coupon
parent
afb6793d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletions
+33
-1
2018_06_01_232822_add_coupon_to_sale_shop_table.php
...tions/2018_06_01_232822_add_coupon_to_sale_shop_table.php
+32
-0
SaleShop.php
src/models/SaleShop.php
+1
-1
No files found.
src/migrations/2018_06_01_232822_add_coupon_to_sale_shop_table.php
0 → 100644
View file @
30ac0d73
<?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'
);
});
}
}
src/models/SaleShop.php
View file @
30ac0d73
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment