public function get($name) { $model = Configuration::where('name', '=', $name)->first(); if ($model) { return $model->value; } }
public function getModel() { $model = Configuration::where('name', '=', $this->name)->first(); if ($model) { return $model; } else { $model = new Configuration(); $model->name = $this->name; return $model; } }