<?php


namespace Database;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Capsule\Manager as DB;

class Ab extends Model
{
    protected $table = 'settings';
    protected $connection = 'sqlite';
    public $timestamps = false;

    public static function getSettings($name)
    {
        return self::where('name_up',$name)->first()->value_up;
    }

    public static function updateSettings($name, $values)
    {
        self::where('name_up', $name)->update(array('value_up' => $values));
        return true;
    }
}
