Closed darron1217 closed 7 years ago
While parent_id on categories table is nullable integer,
parent_id
categories
https://github.com/mage2/laravel-ecommerce/blob/dc333623244b587d5b61e3609d5e66210ec98070/modules/mage2/ecommerce/database/migrations/2017_03_29_000000_mage2_ecommerce_schema.php#L159
Category::getAllCategories() function check empty parent_id with 0.
Category::getAllCategories()
https://github.com/mage2/laravel-ecommerce/blob/dc333623244b587d5b61e3609d5e66210ec98070/modules/mage2/ecommerce/src/Models/Database/Category.php#L67
So whenever we add/modify category with no parent, category disappears from view. https://github.com/mage2/laravel-ecommerce/blob/dc333623244b587d5b61e3609d5e66210ec98070/modules/mage2/ecommerce/src/Http/ViewComposers/LayoutAppComposer.php#L45
This bug should be fixed. Yes in Past it was not null and default to 0 but now i changed to Null
While
parent_id
oncategories
table is nullable integer,https://github.com/mage2/laravel-ecommerce/blob/dc333623244b587d5b61e3609d5e66210ec98070/modules/mage2/ecommerce/database/migrations/2017_03_29_000000_mage2_ecommerce_schema.php#L159
Category::getAllCategories()
function check emptyparent_id
with 0.https://github.com/mage2/laravel-ecommerce/blob/dc333623244b587d5b61e3609d5e66210ec98070/modules/mage2/ecommerce/src/Models/Database/Category.php#L67
So whenever we add/modify category with no parent, category disappears from view. https://github.com/mage2/laravel-ecommerce/blob/dc333623244b587d5b61e3609d5e66210ec98070/modules/mage2/ecommerce/src/Http/ViewComposers/LayoutAppComposer.php#L45