Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
L
laravel_training
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
TTS Tran Viet Anh
laravel_training
Commits
9dbf4827
Commit
9dbf4827
authored
Nov 09, 2022
by
TTS Tran Viet Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ENABLE -> ENABLED
parent
cada8274
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
11 deletions
+11
-11
PostCategory.php
app/Models/PostCategory.php
+1
-1
Product.php
app/Models/Product.php
+1
-1
ProductCategory.php
app/Models/ProductCategory.php
+1
-1
PostCategoryFactory.php
database/factories/PostCategoryFactory.php
+2
-2
ProductCategoryFactory.php
database/factories/ProductCategoryFactory.php
+2
-2
ProductFactory.php
database/factories/ProductFactory.php
+1
-1
2022_10_31_070501_create_products_table.php
...se/migrations/2022_10_31_070501_create_products_table.php
+1
-1
2022_10_31_100142_create_product_categories_table.php
...ons/2022_10_31_100142_create_product_categories_table.php
+1
-1
2022_10_31_100202_create_post_categories_table.php
...ations/2022_10_31_100202_create_post_categories_table.php
+1
-1
No files found.
app/Models/PostCategory.php
View file @
9dbf4827
...
...
@@ -8,7 +8,7 @@
class
PostCategory
extends
Model
{
const
STATUS_ENABLE
=
1
;
const
STATUS_ENABLE
D
=
1
;
const
STATUS_DISABLE
=
2
;
const
STATUS_DELETED
=
3
;
...
...
app/Models/Product.php
View file @
9dbf4827
...
...
@@ -8,7 +8,7 @@
class
Product
extends
Model
{
const
STATUS_ENABLE
=
1
;
const
STATUS_ENABLE
D
=
1
;
const
STATUS_DISABLE
=
2
;
const
STATUS_DELETED
=
3
;
...
...
app/Models/ProductCategory.php
View file @
9dbf4827
...
...
@@ -8,7 +8,7 @@
class
ProductCategory
extends
Model
{
const
STATUS_ENABLE
=
1
;
const
STATUS_ENABLE
D
=
1
;
const
STATUS_DISABLE
=
2
;
const
STATUS_DELETED
=
3
;
...
...
database/factories/PostCategoryFactory.php
View file @
9dbf4827
...
...
@@ -17,8 +17,8 @@ public function definition()
return
[
'name'
=>
$this
->
faker
->
sentence
(
1
),
'image'
=>
$this
->
faker
->
imageUrl
(
80
,
640
,
'Post category'
,
true
),
'parent_id'
=>
rand
(
0
,
1
)
?
null
:
rand
(
1
,
10
),
'status'
=>
PostCategory
::
STATUS_ENABLE
,
'parent_id'
=>
rand
(
0
,
1
)
?
null
:
rand
(
1
,
5
),
'status'
=>
PostCategory
::
STATUS_ENABLE
D
,
'ordering'
=>
rand
(
1
,
3
),
];
}
...
...
database/factories/ProductCategoryFactory.php
View file @
9dbf4827
...
...
@@ -17,8 +17,8 @@ public function definition()
return
[
'name'
=>
$this
->
faker
->
sentence
(
1
),
'image'
=>
$this
->
faker
->
imageUrl
(
80
,
640
,
'product category'
,
true
),
'parent_id'
=>
rand
(
0
,
1
)
?
null
:
rand
(
1
,
10
),
'status'
=>
ProductCategory
::
STATUS_ENABLE
,
'parent_id'
=>
rand
(
0
,
1
)
?
null
:
rand
(
1
,
5
),
'status'
=>
ProductCategory
::
STATUS_ENABLE
D
,
'ordering'
=>
rand
(
1
,
3
),
];
}
...
...
database/factories/ProductFactory.php
View file @
9dbf4827
...
...
@@ -22,7 +22,7 @@ public function definition()
'price'
=>
$this
->
faker
->
randomFloat
(
2
,
10
,
200
),
'product_category_id'
=>
ProductCategory
::
inRandomOrder
()
->
first
()
->
id
??
null
,
'stock'
=>
$this
->
faker
->
numberBetween
(
0
,
200
),
'status'
=>
Product
::
STATUS_ENABLE
,
'status'
=>
Product
::
STATUS_ENABLE
D
,
];
}
}
database/migrations/2022_10_31_070501_create_products_table.php
View file @
9dbf4827
...
...
@@ -22,7 +22,7 @@ public function up()
$table
->
decimal
(
'price'
,
8
,
2
);
$table
->
unsignedInteger
(
'product_category_id'
);
$table
->
unsignedInteger
(
'stock'
);
$table
->
unsignedTinyInteger
(
'status'
)
->
default
(
Product
::
STATUS_ENABLE
);
$table
->
unsignedTinyInteger
(
'status'
)
->
default
(
Product
::
STATUS_ENABLE
D
);
$table
->
softDeletes
();
$table
->
timestamps
();
});
...
...
database/migrations/2022_10_31_100142_create_product_categories_table.php
View file @
9dbf4827
...
...
@@ -19,7 +19,7 @@ public function up()
$table
->
string
(
'name'
);
$table
->
string
(
'image'
);
$table
->
unsignedInteger
(
'parent_id'
)
->
nullable
();
$table
->
unsignedTinyInteger
(
'status'
)
->
default
(
ProductCategory
::
STATUS_ENABLE
);
$table
->
unsignedTinyInteger
(
'status'
)
->
default
(
ProductCategory
::
STATUS_ENABLE
D
);
$table
->
unsignedInteger
(
'ordering'
);
$table
->
softDeletes
();
$table
->
timestamps
();
...
...
database/migrations/2022_10_31_100202_create_post_categories_table.php
View file @
9dbf4827
...
...
@@ -19,7 +19,7 @@ public function up()
$table
->
string
(
'name'
);
$table
->
string
(
'image'
);
$table
->
unsignedInteger
(
'parent_id'
)
->
nullable
();
$table
->
unsignedTinyInteger
(
'status'
)
->
default
(
PostCategory
::
STATUS_ENABLE
);
$table
->
unsignedTinyInteger
(
'status'
)
->
default
(
PostCategory
::
STATUS_ENABLE
D
);
$table
->
unsignedInteger
(
'ordering'
);
$table
->
softDeletes
();
$table
->
timestamps
();
...
...
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