Files
tbbank-new/app/Modules/Loan/Filaments/Actions/ShowLoanRemainingAction.php
2025-11-02 21:50:50 +05:00

23 lines
641 B
PHP

<?php
namespace App\Modules\Loan\Filaments\Actions;
use App\Modules\Loan\Models\Loan;
use App\Modules\Loan\Repositories\LoanRepository;
use Filament\Actions\Action;
use Illuminate\Contracts\View\View;
class ShowLoanRemainingAction
{
public static function make(): Action
{
return Action::make('show_loan_remaining')
->label(__('Show remaining loan'))
->icon('heroicon-o-banknotes')
->requiresConfirmation(false)
->modal()
->modalContent(fn (Loan $record): View => LoanRepository::make()->showRemainingLoan($record))
->modalFooterActions([]);
}
}