refactor loan paid off letter for clarity and consistency
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Loans\Resources\LoanOrderMobiles;
|
||||
|
||||
use App\Filament\Clusters\Loans\LoansCluster;
|
||||
use App\Filament\Clusters\Loans\Resources\LoanOrderMobiles\Pages\CreateLoanOrderMobile;
|
||||
use App\Filament\Clusters\Loans\Resources\LoanOrderMobiles\Pages\EditLoanOrderMobile;
|
||||
use App\Filament\Clusters\Loans\Resources\LoanOrderMobiles\Pages\ListLoanOrderMobiles;
|
||||
use App\Filament\Clusters\Loans\Resources\LoanOrderMobiles\Pages\ViewLoanOrderMobile;
|
||||
use App\Filament\Clusters\Loans\Resources\LoanOrderMobiles\Schemas\LoanOrderMobileForm;
|
||||
use App\Filament\Clusters\Loans\Resources\LoanOrderMobiles\Schemas\LoanOrderMobileInfolist;
|
||||
use App\Filament\Clusters\Loans\Resources\LoanOrderMobiles\Tables\LoanOrderMobilesTable;
|
||||
use App\Modules\LoanOrder\Models\LoanOrder;
|
||||
use App\Modules\LoanOrder\Models\LoanOrderMobile;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
class LoanOrderMobileResource extends Resource
|
||||
{
|
||||
protected static ?string $model = LoanOrder::class;
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedDevicePhoneMobile;
|
||||
|
||||
protected static string|BackedEnum|null $activeNavigationIcon = Heroicon::DevicePhoneMobile;
|
||||
|
||||
protected static ?string $cluster = LoansCluster::class;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'unique_id';
|
||||
|
||||
public static function getNavigationLabel(): string
|
||||
{
|
||||
return __('Mobile loan order');
|
||||
}
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('Mobile loan order');
|
||||
}
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('Mobile loan orders');
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return LoanOrderMobileForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return LoanOrderMobilesTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListLoanOrderMobiles::route('/'),
|
||||
'create' => CreateLoanOrderMobile::route('/create'),
|
||||
'edit' => EditLoanOrderMobile::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getRecordRouteBindingEloquentQuery(): Builder
|
||||
{
|
||||
return parent::getRecordRouteBindingEloquentQuery()
|
||||
->withoutGlobalScopes([
|
||||
SoftDeletingScope::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user