
<?php namespace App\Models;
use CodeIgniter\Model;
class AttendanceModel extends Model {
 protected $table='attendance';
 protected $allowedFields=['user_id','punch_in','punch_out','work_mode','created_at'];
 public function getAll(){
  return $this->select('users.name,punch_in,punch_out,work_mode')
  ->join('users','users.id=attendance.user_id')->findAll();
 }
}
