Category : crud

Here is my Controller class Mahasiswa extends Controller { public function index() { $data[‘judul’] = ‘Daftar Mahasiswa’; $data[‘mhs’] = $this->model(‘Mahasiswa_model’)->get_AllMahasiswa(); $this->view(‘templates/header’, $data); $this->view(‘mahasiswa/index’, $data); $this->view(‘templates/footer’); } } And this is my model class Mahasiswa_model { private $mhs = [ ]; public function getAllMahasiswa() { return $this->mhs; } } Error: Fatal error: Uncaught Error: Call to ..

Read more

Kind note: Practicing PHP I got the CRUD library from this repo: https://github.com/rorystandley/mysqli-crud-php-oop. I setup the database, connected to to it and everything is great. I am only unaware of how to use this globally? I have different pages for different data tables, I see it not logical to create multi "insert.php" files for each ..

Read more

Good day everyone! I want to update staff details. But i got an error said that, "Undefined variable $staffs (View: C:xampphtdocsstaffRecordsresourcesviewslistofstaff.blade.php)". The scenario is, HR can view list of staffs and can click on edit button and it will go to the update staff details. Route:- Route::get(‘updatestaffs/{id}’, [StaffController::class, ‘edit’])->name(‘updatestaffs’); //update staff Controller:- public function edit($id) ..

Read more