diff --git a/app/Livewire/Studio/Catalog/Brand.php b/app/Livewire/Studio/Catalog/Brand.php index 69197b7..bd57015 100644 --- a/app/Livewire/Studio/Catalog/Brand.php +++ b/app/Livewire/Studio/Catalog/Brand.php @@ -89,9 +89,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setBrand(BrandModel::byHashOrFail($id)); - } + $id && $this->form->setBrand(BrandModel::byHashOrFail($id)); } public function render(): View diff --git a/app/Livewire/Studio/Catalog/Category.php b/app/Livewire/Studio/Catalog/Category.php index 3184355..ea3cb6b 100644 --- a/app/Livewire/Studio/Catalog/Category.php +++ b/app/Livewire/Studio/Catalog/Category.php @@ -89,9 +89,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setCategory(CategoryModel::byHashOrFail($id)); - } + $id && $this->form->setCategory(CategoryModel::byHashOrFail($id)); } public function render(): View diff --git a/app/Livewire/Studio/Feature/ChooseUs.php b/app/Livewire/Studio/Feature/ChooseUs.php index 5158d0b..de9e768 100644 --- a/app/Livewire/Studio/Feature/ChooseUs.php +++ b/app/Livewire/Studio/Feature/ChooseUs.php @@ -89,9 +89,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setChooseUs(ChooseUsModel::byHashOrFail($id)); - } + $id && $this->form->setChooseUs(ChooseUsModel::byHashOrFail($id)); } public function render(): View diff --git a/app/Livewire/Studio/Feature/PerfumeFeature.php b/app/Livewire/Studio/Feature/PerfumeFeature.php index 984cd6f..26f0afd 100644 --- a/app/Livewire/Studio/Feature/PerfumeFeature.php +++ b/app/Livewire/Studio/Feature/PerfumeFeature.php @@ -89,9 +89,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setPerfumeFeature(PerfumeFeatureModel::byHashOrFail($id)); - } + $id && $this->form->setPerfumeFeature(PerfumeFeatureModel::byHashOrFail($id)); } public function render(): View diff --git a/app/Livewire/Studio/Finance/Expense.php b/app/Livewire/Studio/Finance/Expense.php index c52198b..c1789e3 100644 --- a/app/Livewire/Studio/Finance/Expense.php +++ b/app/Livewire/Studio/Finance/Expense.php @@ -88,9 +88,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setExpense(ExpenseModel::byHashOrFail($id)); - } + $id && $this->form->setExpense(ExpenseModel::byHashOrFail($id)); } public function render(): View diff --git a/app/Livewire/Studio/Information/Broadcast.php b/app/Livewire/Studio/Information/Broadcast.php index dffd59e..8acd1b0 100644 --- a/app/Livewire/Studio/Information/Broadcast.php +++ b/app/Livewire/Studio/Information/Broadcast.php @@ -83,9 +83,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setBroadcast(BroadcastModel::byHashOrFail($id)); - } + $id && $this->form->setBroadcast(BroadcastModel::byHashOrFail($id)); } public function render(): View diff --git a/app/Livewire/Studio/Information/Faq.php b/app/Livewire/Studio/Information/Faq.php index 267a09a..3b77735 100644 --- a/app/Livewire/Studio/Information/Faq.php +++ b/app/Livewire/Studio/Information/Faq.php @@ -89,9 +89,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setFaq(FaqModel::byHashOrFail($id)); - } + $id && $this->form->setFaq(FaqModel::byHashOrFail($id)); } public function render(): View diff --git a/app/Livewire/Studio/Loyalty/Customer.php b/app/Livewire/Studio/Loyalty/Customer.php index 2af9100..afe148b 100644 --- a/app/Livewire/Studio/Loyalty/Customer.php +++ b/app/Livewire/Studio/Loyalty/Customer.php @@ -56,9 +56,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setCustomer(CustomerModel::byHashOrFail($id)); - } + $id && $this->form->setCustomer(CustomerModel::byHashOrFail($id)); } public function create(): void diff --git a/app/Livewire/Studio/Loyalty/Tier/Index.php b/app/Livewire/Studio/Loyalty/Tier/Index.php index 9390dc5..f5416eb 100644 --- a/app/Livewire/Studio/Loyalty/Tier/Index.php +++ b/app/Livewire/Studio/Loyalty/Tier/Index.php @@ -178,9 +178,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setTier(TierModel::byHashOrFail($id)); - } + $id && $this->form->setTier(TierModel::byHashOrFail($id)); } public function render(): View diff --git a/app/Livewire/Studio/Master/Formula.php b/app/Livewire/Studio/Master/Formula.php index 0ed7b37..500e527 100644 --- a/app/Livewire/Studio/Master/Formula.php +++ b/app/Livewire/Studio/Master/Formula.php @@ -164,9 +164,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null $this->method = $method; $this->modalTitle = $modalTitle; - if ($id) { - $this->form->setFormula(FormulaModel::byHashOrFail($id)); - } + $id && $this->form->setFormula(FormulaModel::byHashOrFail($id)); } public function render(): View