<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use DB;

class BankAccount extends Model{
    use HasFactory;
    protected $table = 'bank_account';
    
    protected $fillable = [
        'name',
        'status',
        'created_at',
        'updated_at'
    ];

    public function export($slug){
        $collection = DB::table('bank_account')
                        ->select('name','status');

        
        $data = $collection->get();
        
        if($data->isNotEmpty()){
            return $data;
        }else{
            return null;
        }
    }
}
