/** * @return Entry[] */ public function getPersonalKeys() { return Entry::with('tags')->where('entry.user_id', auth()->user()->id)->whereNull('entry.project_id')->get(); }
/** * Return list of keys which belong to project * * @param Project $model * @return mixed */ public function getKeys(Project $model) { return Entry::with('tags')->where('entry.project_id', $model->id)->get(); }