presensi/app/Models/Presensi.php

33 lines
652 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Presensi extends Model
{
use HasFactory;
protected $table = 'presensi';
protected $fillable = [
'latitude',
'longitude',
'status',
'keterangan',
'user_id',
'clock_type',
'foto',
'file_pdf',
];
/**
* Get the user that owns the presensi.
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}