- Notifications
You must be signed in to change notification settings - Fork 231
Closed
Labels
Description
Describe the bug
i need chnage fillable in eloquent by user role
public function __construct(array $attributes = []) { if(auth()->user()->is_admin){ $this->fillable[] = 'is_active'; $this->fillable[] = 'sales_discount'; $this->fillable[] = 'business_package_id'; $this->fillable[] = 'business_contract_id'; } parent::__construct($attributes); }
but need twice update for get fillable
Environment
- PHP: 7.4
- OS: Ubuntu 18.04
- Laravel: 6.18
- Model Caching: 0.7.4
Additional context
Add any other context about the problem here.