<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Setting extends Model
{
	protected $timestamp = false;
	protected $primaryKey = 'slug';

    public static function getSetting($slug) {
    	return Setting::find($slug);
    }

    public static function createSetting($slug, $value) {
    	$item = new Setting();
    	$item->slug = $slug;
    	$item->value = $value;
    	return $item->save();
    }
}
