api lejer dan imbang duga

This commit is contained in:
hafifierahman
2021-03-11 09:04:31 +08:00
parent 4991277855
commit ad161ea2d0
17 changed files with 1055 additions and 4 deletions
@@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers;
use App\Vault;
use App\Cawangan;
use App\Tunai;
use App\AddTunai;
use App\GlDetail;
use App\Product;
use Illuminate\Http\Request;
use Carbon\Carbon;
class ProductController extends Controller
{
public function getProduct($kodcaw)
{
$current = Carbon::now();
$current = new Carbon();
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$product=Product::on($cawangan['mysql'])->get();
return response()->json($product);
}
}