diff --git a/backend/controllers/BrandController.php b/backend/controllers/BrandController.php index a148c1c..d3eb8c2 100644 --- a/backend/controllers/BrandController.php +++ b/backend/controllers/BrandController.php @@ -28,7 +28,7 @@ class BrandController extends Controller 'allow' => true, ], [ - 'actions' => ['logout', 'index'], + 'actions' => ['logout', 'index', 'create', 'update', 'view', 'delete'], 'allow' => true, 'roles' => ['@'], ], diff --git a/common/modules/product/models/Product.php b/common/modules/product/models/Product.php index f09eeed..e866f0b 100644 --- a/common/modules/product/models/Product.php +++ b/common/modules/product/models/Product.php @@ -142,7 +142,7 @@ class Product extends \yii\db\ActiveRecord public function getFullName() { - return $this->brand->name .' '. $this->name; + return empty($this->brand) ? $this->name : $this->brand->name .' '. $this->name; } public function getCategories() { -- libgit2 0.21.4