<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use App\User_logs;

class User_logs extends Model
{
    protected $table = 'userlogs';
	public $fillable = ['title','content','type','user_id'];
	
	public function user() {
		return $this->belongsTo('App\User','user_id');
	}
	
	public static function UserLogs($title, $content, $userid){
	    
		$userlog = New User_logs;
		$userlog->title		= $title;
		$userlog->content	= $content;
		$userlog->user_id	= $userid;
        $userlog->save();
	}
}
