protected function createSelectWithConstraint($name)
    {
        return [explode(':', $name)[0], function ($query) use ($name) {
            $query->select(explode(',', explode(':', $name)[1]));
        }];
    }
protected function createSelectWithConstraint($name)
    {
        return [explode(':', $name)[0], function ($query) use ($name) {
            $query->select(explode(',', explode(':', $name)[1]));
        }];
    }
protected function createSelectWithConstraint ( $ name ) { return [ explode ( ':' , $ name ) [ 0 ] , function ( $ query ) use ( $ name ) { $ query -> select ( explode ( ',' , explode ( ':' , $ name ) [ 1 ] ) ) ; } ] ; }
Create a constraint to select the given columns for the relation.

@param  string  $name
@return array
Create a constraint to select the given columns for the relation .