This commit is contained in:
2024-01-29 00:57:08 +05:00
parent a70230b7c1
commit a093230287

View File

@@ -143,14 +143,14 @@ class CardOrder extends Resource
* *
* @param \Laravel\Nova\Resource $resource * @param \Laravel\Nova\Resource $resource
*/ */
public static function redirectAfterUpdate(NovaRequest $request, $resource): URL|string // public static function redirectAfterUpdate(NovaRequest $request, $resource): URL|string
{ // {
$payment = (new OnlinePaymentRepo())->payCardOrder($resource); // $payment = (new OnlinePaymentRepo())->payCardOrder($resource);
return $payment['status'] === 'success' // return $payment['status'] === 'success'
? URL::remote($payment['url']) // ? URL::remote($payment['url'])
: sprintf('resources/%s/%s', static::uriKey(), $resource->getKey()); // : sprintf('resources/%s/%s', static::uriKey(), $resource->getKey());
} // }
/** /**
* Get the fields for index. * Get the fields for index.