62 lines
No EOL
1.6 KiB
PHP
62 lines
No EOL
1.6 KiB
PHP
<?php
|
|
|
|
|
|
namespace App\Http\Controllers\User;
|
|
use App\Http\Controllers\Controller;
|
|
use App\User;
|
|
use Request;
|
|
use Carbon;
|
|
use App\Models\ShoppingOrder;
|
|
|
|
|
|
class PaymentController extends Controller
|
|
{
|
|
|
|
public function __construct()
|
|
{
|
|
$this->middleware('auth');
|
|
}
|
|
|
|
public function paycredit()
|
|
{
|
|
$data = [
|
|
'user' => \Auth::user()
|
|
];
|
|
return view('user.payment.paycredit', $data);
|
|
}
|
|
|
|
/*public function index()
|
|
{
|
|
$start = 2021;
|
|
$end = date('Y');
|
|
$years = range($start, $end);
|
|
|
|
if(Request::get('filter_sales_year')){
|
|
$active_year = Request::get('filter_sales_year');
|
|
}else{
|
|
$active_year = $end;
|
|
}
|
|
|
|
$date1 = Carbon::parse('01.01.'.$active_year." 00:00:00")->format('Y-m-d H:i:s');
|
|
$date2 = Carbon::parse('31.12.'.$active_year." 23:59:59")->toDateString();
|
|
|
|
|
|
$values = ShoppingOrder::where('shopping_orders.auth_user_id', '!=', NULL) //::with('shopping_user', )->select('shopping_orders.*')
|
|
->where('mode', '=', 'live')
|
|
->where('paid', '=', 1)
|
|
->whereHas('shopping_order_items', function($q) {
|
|
|
|
$q->where('product_id', 34)->OrWhere('product_id', 35)->OrWhere('product_id', 36)->OrWhere('product_id', 67)->OrWhere('product_id', 69);
|
|
})
|
|
->whereBetween('created_at', [$date1, $date2])
|
|
->get();
|
|
|
|
$data = [
|
|
'years' => $years,
|
|
'active_year' => $active_year,
|
|
'values' => $values,
|
|
];
|
|
return view('user.revenue.index', $data);
|
|
}
|
|
*/
|
|
} |