where($column['name'], Auth::id()); break; } } return $query->get(); } /** * Determines whether a user column exists and whether it matches the current user if it does * * @return boolean */ public function userCheck() { $user_check = true; foreach (static::$dashboard_columns as $column) { if (array_key_exists('type', $column) && $column['type'] == 'user') { if ($this->{$column['name']} != Auth::id()) { $user_check = false; } break; } } return $user_check; } }