OPtmization
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Nova\Resources\Order\Loan\Concerns;
|
namespace App\Nova\Resources\Order\Loan\Concerns;
|
||||||
|
|
||||||
use App\Nova\Resources\Branch\Branch;
|
use App\Nova\Resources\Branch\Branch;
|
||||||
|
use App\Nova\Resources\Order\Loan\LoanType;
|
||||||
use App\Nova\Resources\System\Location\Province;
|
use App\Nova\Resources\System\Location\Province;
|
||||||
use App\Repos\Order\Loan\LoanTypeRepo;
|
use App\Repos\Order\Loan\LoanTypeRepo;
|
||||||
use App\Repos\Order\OrderRepo;
|
use App\Repos\Order\OrderRepo;
|
||||||
@@ -41,10 +42,7 @@ class LoanOrderFieldsForDetail
|
|||||||
->icons(OrderRepo::statusIcons()),
|
->icons(OrderRepo::statusIcons()),
|
||||||
|
|
||||||
new Panel(__('Loan'), [
|
new Panel(__('Loan'), [
|
||||||
Select::make(__('Loan type'), 'loan_type')
|
BelongsTo::make(__('Loan type'), 'loanType', LoanType::class),
|
||||||
->displayUsingLabels()
|
|
||||||
->fullWidth()
|
|
||||||
->options(LoanTypeRepo::values()),
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
new Panel(__('Location'), [
|
new Panel(__('Location'), [
|
||||||
|
|||||||
@@ -50,6 +50,13 @@ class LoanOrder extends Resource
|
|||||||
*/
|
*/
|
||||||
public static $title = 'unique_id';
|
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.
|
* The columns that should be searched.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user