<?php

namespace App\Service\Transfer;

use App\Models\Bank;
use Illuminate\Support\Facades\Auth;

class BankService
{
    public static function BankStore(array $data)
    {
        $prepard = collect($data);
        $data = $prepard->merge(['shop_id' => Auth::user()->shop_id]);
        Bank::create($data->toArray());
    }

    public static function BankUpdate(array $data, $id)
    {
        $prepard = collect($data);

        Bank::find($id)->update($prepard->toArray());
    }
}
