<?php
/**
 * Created by PhpStorm.
 * User: foda
 * Date: 1/18/2019
 * Time: 6:19 PM
 */

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Fields
 *
 * @property integer $id
 * @property string $field
 * @method static \Illuminate\Database\Query\Builder|\App\Areas whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Areas whereField($value)
 */

class Fields extends model
{
    protected $table = 'fields';

    public static function getAllFields()
    {
        return \DB::table('fields')
            ->select([
                'id',
                'field'
            ])
            ->get();
    }

    public static function addField($field)
    {
        return \DB::table('fields')
            ->insert(['field' => $field]);
    }
}