commit 08-2025
This commit is contained in:
parent
9b54eb0512
commit
02f2a4c23e
184 changed files with 31653 additions and 22327 deletions
|
|
@ -61,7 +61,7 @@ class PromotionController extends Controller
|
|||
if(isset($data['action']) && $data['action'] === 'save-user-promotion'){
|
||||
$rules = array(
|
||||
'name' => 'required',
|
||||
'user_promotion_url' => ' required|alpha_dash|profanity|'.'unique:promotion_users,url,'.$id.',id'.'|min:4|max:20|full_word_check',
|
||||
'user_promotion_url' => ' required|alpha_dash|'.'unique:promotion_users,url,'.$id.',id'.'|min:4|max:20|full_word_check',
|
||||
);
|
||||
Validator::extend('full_word_check', function ($attribute, $value, $parameters, $validator) {
|
||||
$profanity = \App\Models\Setting::getContentBySlug('promotion_user_url_profanity');
|
||||
|
|
@ -107,7 +107,7 @@ class PromotionController extends Controller
|
|||
$unique .= ','.$data['puid'].',id';
|
||||
}
|
||||
$rules = array(
|
||||
'user_promotion_url' => ' required|alpha_dash|profanity|'.$unique.'|min:4|max:20|full_word_check',
|
||||
'user_promotion_url' => ' required|alpha_dash|'.$unique.'|min:4|max:20|full_word_check',
|
||||
);
|
||||
Validator::extend('full_word_check', function ($attribute, $value, $parameters, $validator) {
|
||||
$profanity = \App\Models\Setting::getContentBySlug('promotion_user_url_profanity');
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace App\Http\Controllers\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
use Request;
|
||||
use Carbon;
|
||||
use App\Models\ShoppingOrder;
|
||||
|
||||
|
||||
class RevenueController extends Controller
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ class ShopController extends Controller
|
|||
if(isset($data['action']) && $data['action'] === 'save-user-shop'){
|
||||
$rules = array(
|
||||
'name' => 'required',
|
||||
'user_shop_url' => ' required|alpha_dash|profanity|'.'unique:user_shops,url,'.$user->shop->id.',id'.'|min:4|max:20|full_word_check',
|
||||
'user_shop_url' => ' required|alpha_dash|'.'unique:user_shops,url,'.$user->shop->id.',id'.'|min:4|max:20|full_word_check',
|
||||
);
|
||||
Validator::extend('full_word_check', function ($attribute, $value, $parameters, $validator) {
|
||||
$profanity = \App\Models\Setting::getContentBySlug('promotion_user_url_profanity');
|
||||
|
|
@ -84,7 +84,7 @@ class ShopController extends Controller
|
|||
$unique .= ','.$data['usid'].',id';
|
||||
}
|
||||
$rules = array(
|
||||
'user_shop_url' => ' required|alpha_dash|profanity|'.$unique.'|min:4|max:20|full_word_check',
|
||||
'user_shop_url' => ' required|alpha_dash|'.$unique.'|min:4|max:20|full_word_check',
|
||||
);
|
||||
Validator::extend('full_word_check', function ($attribute, $value, $parameters, $validator) {
|
||||
$profanity = \App\Models\Setting::getContentBySlug('promotion_user_url_profanity');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue