<?php

namespace App\Classes;

use App\Models\User;
use Illuminate\Support\Facades\DB;


class BkashUser
{
    public function check()
    {
        $bkashUser =  User::where('email', 'account@bkash.com')->first();

        if ($bkashUser == null) {
            $bkashUser = User::create([
                'name' => 'Bkash',
                'email' => 'account@bkash.com',
                'password' => 'sdfsdfweosdifsjdfksdfsdf'
            ]);

            DB::table('user_details')->insert([
                'user_id' => $bkashUser->id,
                'company' => 'Bkash',
                'message' => 'Bkash',
                'token_admin' => 'no',
                'user_status' => 'active'
            ]);
        }

        return $bkashUser;
    }
}
