skip to Main Content

Laravel get value from another table based on id

I want to get department_name from department table with table department = id, department_name, total_employee table employee = id, employee_name, id_department, email, telephone, gender, status I tried model.Employee public function department() { return $this->belongsTo(Department::class); } controllers.EmployeeControllers public function index() {…

VIEW QUESTION
Back To Top
Search