<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Transaction extends Model
{
    //
    protected $table = 'transaction';
    protected $fillable = [
        'user_id', 'payment_id', 'slot', 'state', 'insurance', 'pin', 'total_price', 'start_rent', 'end_rent', 'created_at', 'updated_at'
    ];
    protected $primaryKey = 'transaction_id';

    public function user()
    {
        return $this->belongsTo('App\User', 'user_id', 'id');
    }
}

{'avg_line_length': 22.19047619047619, 'max_line_length': 137, 'alphanum_fraction': 0.6266094420600858, 'licenses': ['MIT'], 'repository_name': 'verrellbd/Gudangpedia-Admin', 'path': 'app/Transaction.php', 'size': 466, 'lang': 'PHP'}