KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/globalaudiovideo/shop.globalaudiovideo.co.in/app/Services/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/globalaudiovideo/shop.globalaudiovideo.co.in/app/Services/CustomerService.php
<?php

namespace App\Services;

use App\Traits\FileManagerTrait;

class CustomerService
{
    use FileManagerTrait;

    /**
     * @return array[f_name: mixed, l_name: mixed, email: mixed, phone: mixed, country: mixed, city: mixed, zip: mixed, street_address: mixed, password: string]
     */
    public function getCustomerData(object $request):array
    {
        return [
            'f_name' => $request['f_name'],
            'l_name' => $request['l_name'],
            'email' => $request['email'],
            'phone' => $request['phone'],
            'country' => $request['country']??null,
            'city' => $request['city']??null,
            'zip' => $request['zip_code']??null,
            'street_address' =>$request['address']??null,
            'password' => bcrypt($request['password'] ?? 'password')
        ];
    }

    public function deleteImage(object|null $data): bool
    {
        if ($data && $data['image']) {
            $this->delete('profile/' . $data['image']);
        };
        return true;
    }
}

Anon7 - 2021