<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Validator;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class Draft extends Model
{
    use HasFactory;

    protected $table = 'drafts';

    protected $fillable = [
        'user_id',
        'body'
    ];

    public function validate($input = []){
        $validator = Validator::make($input,[
            'body' => 'required',
        ]);

        return $validator;
    }

}
