@php function trim_word($word,$length){ $new_word = substr($word,0,$length); return $new_word; } $common_helper = \App\Helpers\CommonHelper::class; $customer_cnic_arr = $common_helper::getCnicArray($sell->customer->nid); $kin_cinc_arr = $common_helper::getCnicArray($kin->nic); $res_address = $common_helper::getTwoSubstrings($sell->customer->home_address,65,90); $res_address_first_line = ucwords(strtolower($res_address[0])); $res_address_second_line = ucwords(strtolower($res_address[1])); $content = str_replace(["[COMPANY_NAME]","[BRANCH]"], [ config('settings.company_name') , $sell->branch->name ], $sell->branch->terms_and_conditions); // dd($sell->branch->img_url); @endphp