28 lines
492 B
PHP
28 lines
492 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Presensi extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'presensi';
|
|
|
|
protected $fillable = [
|
|
'latitude',
|
|
'longitude',
|
|
'status',
|
|
'keterangan',
|
|
'user_id',
|
|
'clock_type',
|
|
'foto',
|
|
];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id', 'id');
|
|
}
|
|
}
|