public function onlyMe($field = 'user_id', $owner_id = null) { if (is_null($owner_id)) { $owner_id = Auth::user()->id; } $this->model = $this->model->where($field, $owner_id); return $this; }