disable penyata uncomplete

This commit is contained in:
hayatie
2025-12-10 12:01:04 +08:00
parent 90177859aa
commit d62e5f6105
3 changed files with 48 additions and 1 deletions
@@ -0,0 +1,31 @@
<?php
namespace App\Http\Controllers;
use App\Models\Penyata;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class PenyataController extends Controller
{
// Get penyata by id
public function show($id)
{
$penyata = penyata::select(
'saham',
'yuran',
'pelaburan_t1 AS pelaburanT1',
'pelaburan_t2 AS pelaburanT2',
'pinjaman_aqh AS pinjamanAQH',
'pinjaman_bba AS pinjamanBBA',
'pinjaman_bai AS pinjamanBAI',
'pinjaman_bys AS pinjamanBYS',
'insurans_cukai',
'pinj_pelbagai AS pinjamanPelbagai'
)->find($id);
return response()->json($penyata);
}
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Penyata extends Model
{
protected $table = 'penyata'; // optional if table name matches model
protected $primaryKey = 'id'; // optional if primary key is 'id'
public $timestamps = false; // set to true if table has created_at/updated_at
}