@extends('frontend.layout_2') @section('title', 'কিস্তি পরিশোধ') @push('styles') @endpush @section('sub_layout') @php $oldMethod = old('method'); $headerData = null; if ($oldMethod && str_starts_with($oldMethod, 'mobile:')) { $slug = substr($oldMethod, 7); $pm = $mobileMethods->firstWhere('slug', $slug); if ($pm) { $headerData = [ 'type' => 'mobile', 'name' => $pm->name, 'logo' => $pm->logo ?? null, 'account' => $pm->account_number, 'holder' => null, 'branch' => null, ]; } } elseif ($oldMethod && str_starts_with($oldMethod, 'bank:')) { $slug = substr($oldMethod, 5); $pm = $bankMethods->firstWhere('slug', $slug); if ($pm) { $headerData = [ 'type' => 'bank', 'name' => $pm->bank_name, 'logo' => $pm->logo ?? null, 'account' => $pm->account_number, 'holder' => $pm->account_holder, 'branch' => $pm->branch_name, ]; } } $headerLogo = ''; if($headerData && !empty($headerData['logo'])){ $headerLogo = preg_match('/^(https?:\/\/|\/)/i', $headerData['logo']) ? $headerData['logo'] : asset('storage/'.$headerData['logo']); } @endphp