/** * Get all preferences for a namespace. * * @param $getNamespace * @return PreferenceCollection */ public function getAll($namespace) { $preferences = $this->model->where('key', 'LIKE', $namespace . '::%')->get(); return new PreferenceCollection($preferences->lists('value', 'key')); }
/** * Find all preferences with namespace. * * @param $namespace * @return PreferenceCollection */ public function findAllByNamespace($namespace) { return $this->model->where('key', 'LIKE', $namespace . '%')->get(); }