<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Timeline extends Model
{
    //
    //protected $connection = 'connection-name'; //jika menggunakan 2 DB modelnya harus dikasih ini
    //protected $primaryKey = 'your_key_name'; // set primarykeymu jika bukan ID
    protected $table = 'timelines';
    protected $fillable = [
      'user_id',
      'timeline_photo',
      'caption',
      'is_approved'
    ];
    public function user()
    {
        return $this->belongsTo('App\User');
    }
}
