phpstan 5 errors fixed
This commit is contained in:
@@ -4,11 +4,12 @@ namespace App\Modules\VisaMasterPaymentOrder\Nova\Resources;
|
||||
|
||||
use App\Models\Branch\Branch;
|
||||
use App\Models\Payment\OnlinePaymentHistory;
|
||||
use App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrderItem as VisaMasterPaymentOrderItemModel;
|
||||
use App\Modules\VisaMasterPaymentOrder\Nova\Resources\Item\NovaVisaMasterPaymentOrderItemAuth;
|
||||
use App\Nova\Actions\CheckOnlinePayment;
|
||||
use App\Nova\Resource;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Laravel\Nova\Actions\Action;
|
||||
use Laravel\Nova\Actions\ActionResponse;
|
||||
@@ -19,7 +20,7 @@ use Laravel\Nova\Fields\Text;
|
||||
use Laravel\Nova\Http\Requests\NovaRequest;
|
||||
|
||||
/**
|
||||
* @template TModel of \App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrder
|
||||
* @template TModel of \App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrderItem
|
||||
*/
|
||||
class NovaVisaMasterPaymentOrderItem extends Resource
|
||||
{
|
||||
@@ -28,7 +29,7 @@ class NovaVisaMasterPaymentOrderItem extends Resource
|
||||
/**
|
||||
* The model the resource corresponds to.
|
||||
*
|
||||
* @var class-string<\App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrder>
|
||||
* @var class-string<\App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrderItem>
|
||||
*/
|
||||
public static $model = \App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrderItem::class;
|
||||
|
||||
@@ -107,16 +108,16 @@ class NovaVisaMasterPaymentOrderItem extends Resource
|
||||
|
||||
Text::make('Amaly geçiren raýatyň kart belgisi (mask)', 'payer_card'),
|
||||
|
||||
Text::make('Töleg ýyly', fn () => $this->created_at->format('Y')),
|
||||
Text::make('Töleg aýy', fn () => $this->created_at->translatedFormat('F')),
|
||||
Text::make('Töleg ýyly', fn ($model) => $model->format('Y')),
|
||||
Text::make('Töleg aýy', fn ($model) => $model->created_at->translatedFormat('F')),
|
||||
|
||||
Text::make('Amalyň geçirilen wagty', fn () => $this->created_at->format('H:i, d.m.Y')),
|
||||
Text::make('Amalyň geçirilen wagty', fn ($model) => $model->created_at->format('H:i, d.m.Y')),
|
||||
|
||||
Text::make('Amalyň möçberi', fn () => $this->usd_payment_amount.' USD'),
|
||||
Text::make('Amalyň möçberi', fn ($model) => $model->usd_payment_amount.' USD'),
|
||||
|
||||
Text::make('Amalyň manat möçberi', fn () => $this->tmt_payment_amount.' TMT'),
|
||||
Text::make('Amalyň manat möçberi', fn ($model) => $model->tmt_payment_amount.' TMT'),
|
||||
|
||||
Text::make('Amalyň referensi', fn () => $this->payment_order_number),
|
||||
Text::make('Amalyň referensi', fn ($model) => $model->payment_order_number),
|
||||
|
||||
Boolean::make(__('Paid'), 'paid'),
|
||||
];
|
||||
@@ -126,7 +127,8 @@ class NovaVisaMasterPaymentOrderItem extends Resource
|
||||
{
|
||||
return [
|
||||
Action::using('HALKBANK töleg barla', function (ActionFields $fields, Collection $models) {
|
||||
$item = $onlinePaymentResource = $models->first();
|
||||
/** @var VisaMasterPaymentOrderItemModel $item */
|
||||
$item = $models->first();
|
||||
|
||||
$onlinePaymentResource = OnlinePaymentHistory::find($item->online_payment_history_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user