update 20.10.2025
This commit is contained in:
parent
8c11130b5d
commit
a939cd51ef
616 changed files with 84821 additions and 4121 deletions
48
dev/app-bak/Services/SyS/UserCreditItemsAddFrom.php
Normal file
48
dev/app-bak/Services/SyS/UserCreditItemsAddFrom.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
namespace App\Services\SyS;
|
||||
|
||||
use Request;
|
||||
use Carbon;
|
||||
use App\Models\SySetting;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\UserCreditItem;
|
||||
use App\User;
|
||||
|
||||
class UserCreditItemsAddFrom
|
||||
{
|
||||
|
||||
public static function show()
|
||||
{
|
||||
UserCreditItem::all()->each(function($item){
|
||||
$date = self::getExplodeMessage($item);
|
||||
$item->from_month = $date['n'];
|
||||
$item->from_year = $date['Y'];
|
||||
$item->save();
|
||||
});
|
||||
dd("done");
|
||||
}
|
||||
|
||||
|
||||
private static function getExplodeMessage($item){
|
||||
$date = [];
|
||||
if(strpos($item->message, '#')){
|
||||
$em = explode("#", $item->message);
|
||||
|
||||
if(isset($em[1])){ //month
|
||||
$data['n'] =$em[1];
|
||||
}
|
||||
if(isset($em[2])){ //year
|
||||
$data['Y'] =$em[2];
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function store()
|
||||
{
|
||||
abort(403, 'STOP funtion not online');
|
||||
dd("");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue