This commit is contained in:
nurmuhammet committed 2024-01-28 19:55:36 +05:00
1 parent 9c22cce13b
commit a592a1ba8f
1 file changed
+6 -2
+6 -2
View File
@@ -157,9 +157,13 @@ public static function redirectAfterCreate(NovaRequest $request, $resource): URL
* @param \Laravel\Nova\Resource $resource
* @return \Laravel\Nova\URL|string
*/
public static function redirectAfterUpdate(NovaRequest $request, $resource)
public static function redirectAfterUpdate(NovaRequest $request, $resource): URL|string
{
return URL::remote((new OnlinePaymentRepo())->payCardOrder($resource));
$payment = (new OnlinePaymentRepo())->payCardOrder($resource);
return $payment['status'] === 'success'
? URL::remote($payment['url'])
: sprintf('resources/%s/%s', static::uriKey(), $resource->getKey());
}
/**