src/Mappable.php
protected function alreadyJoined(Builder $query, $table)
    {
        $joined = Arr::pluck((array) $query->getQuery()->joins, 'table');

        return in_array($table, $joined);
    }
protected function alreadyJoined(Builder $query, $table)
    {
        $joined = Arr::pluck((array) $query->getQuery()->joins, 'table');

        return in_array($table, $joined);
    }
protected function alreadyJoined ( Builder $ query , $ table ) { $ joined = Arr :: pluck ( ( array ) $ query -> getQuery ( ) -> joins , 'table' ) ; return in_array ( $ table , $ joined ) ; }
Determine whether given table has been already joined.

@param  \Sofa\Eloquence\Builder $query
@param  string  $table
@return boolean
Determine whether given table has been already joined .