Current File : /home/tradevaly/www/app/Http/Controllers/User/Progress.php |
<?php
namespace App\Http\Controllers\User;
use App\Http\Controllers\Controller;
use App\Models\SellingProgress;
use App\Models\User;
use App\Models\VendorOrder;
use Brian2694\Toastr\Facades\Toastr;
use Carbon\Carbon;
class Progress extends Controller
{
public function index()
{
$waiting_del = VendorOrder::where('vendor_id',auth()->id())->where('status',"new")->orWhere('status',"pending")->sum('total_amount');
$total = SellingProgress::where('seller_id',auth()->id())->where('payment_status',"compleate")->sum('amount');
$totalPending = SellingProgress::where('seller_id',auth()->id())->where('payment_status',"pending")->sum('amount');
$selling_progresses = SellingProgress::where('seller_id',auth()->id())->latest()->paginate(10);
return view('user.pages.selling.index',compact('selling_progresses','totalPending','total','waiting_del'));
}
}