App\Repositories\Setting\EloquentSetting::updateByType PHP Method

updateByType() public method

Update an existing model has a same type.
public updateByType ( array $data ) : boolean
$data array Data to update a model
return boolean
    public function updateByType(array $data)
    {
        $setting = $this->model->where('type', $data['type'])->first();
        $setting->update($data);
        return true;
    }