I wan to wirte a join query to connect same table, and without ON, but when i write it in laravel without on it is showing error
$key = DB::table('api_keys as ak')  
->join('api_keys as bk','') 
              ->where('ak.api_key', $api_key)->where('ak.user_id',0)
              ->pluck('api_key');
want to build the below query,
SELECT * FROM `api_keys` as ak
  JOIN `api_keys` as bk
 WHERE ak.`api_key`=$akey
   and ak.`user_id`=$auser
   and bk.`user_id`=$bsuer
   and bk.`api_key`=$bkey 
 
     
     
     
     
     
    