You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
791 B
27 lines
791 B
<?php
|
|
|
|
namespace App\Http\Controllers\Vendor;
|
|
|
|
use App\Models\WithdrawRequest;
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\DB;
|
|
use App\CentralLogics\Helpers;
|
|
|
|
class SystemController extends Controller
|
|
{
|
|
public function dashboard()
|
|
{
|
|
$withdraw_req=WithdrawRequest::where('vendor_id',Helpers::get_restaurant_id())->latest()->paginate(10);
|
|
return view('vendor-views.dashboard', compact('withdraw_req'));
|
|
}
|
|
|
|
public function restaurant_data()
|
|
{
|
|
$new_order = DB::table('orders')->where(['checked' => 0])->where('restaurant_id', Helpers::get_restaurant_id())->count();
|
|
return response()->json([
|
|
'success' => 1,
|
|
'data' => ['new_order' => $new_order]
|
|
]);
|
|
}
|
|
}
|
|
|