disable penyata uncomplete
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user