OPtmization

This commit is contained in:
2023-12-04 15:14:37 +05:00
parent cd071f7c75
commit 4189c36c00
2 changed files with 9 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Nova\Resources\Order\Loan\Concerns;
use App\Nova\Resources\Branch\Branch;
use App\Nova\Resources\Order\Loan\LoanType;
use App\Nova\Resources\System\Location\Province;
use App\Repos\Order\Loan\LoanTypeRepo;
use App\Repos\Order\OrderRepo;
@@ -41,10 +42,7 @@ class LoanOrderFieldsForDetail
->icons(OrderRepo::statusIcons()),
new Panel(__('Loan'), [
Select::make(__('Loan type'), 'loan_type')
->displayUsingLabels()
->fullWidth()
->options(LoanTypeRepo::values()),
BelongsTo::make(__('Loan type'), 'loanType', LoanType::class),
]),
new Panel(__('Location'), [

View File

@@ -50,6 +50,13 @@ class LoanOrder extends Resource
*/
public static $title = 'unique_id';
/**
* The relationships that should be eager loaded on index queries.
*
* @var array
*/
public static $with = ['branch'];
/**
* The columns that should be searched.
*