fix skit2
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Polis;
|
||||
use App\Cawangan;
|
||||
use App\LookupAlasan;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Carbon\Carbon;
|
||||
@@ -77,4 +78,29 @@ class PolisController extends Controller
|
||||
return response()->json($polis);
|
||||
|
||||
}
|
||||
|
||||
public function LookupAlasan(Request $request)
|
||||
{
|
||||
$harini = Carbon::now();
|
||||
$harini = new Carbon;
|
||||
|
||||
|
||||
$alasan = LookupAlasan::on('mysql7')
|
||||
->get();
|
||||
|
||||
return response()->json($alasan);
|
||||
|
||||
}
|
||||
|
||||
public function LaporanPolis(Request $request){
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$request->kodcaw)->first();
|
||||
|
||||
$polis = Polis::on($cawangan['mysql'])
|
||||
->where('komen1','=',$request->alasan)
|
||||
->where('tarikh','=',$request->tarikh)
|
||||
->get();
|
||||
|
||||
return response()->json($polis);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user