格式化代码
This commit is contained in:
parent
ea75f9b43c
commit
665eecf023
@ -12,7 +12,7 @@ class HomeController extends Controller
|
|||||||
{
|
{
|
||||||
public function index(): View
|
public function index(): View
|
||||||
{
|
{
|
||||||
$modules = (new Module)->whereHasBalance("0.01")->paginate(10);
|
$modules = (new Module)->whereHasBalance('0.01')->paginate(10);
|
||||||
|
|
||||||
return view('admin.index', compact('modules'));
|
return view('admin.index', compact('modules'));
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ public function __construct()
|
|||||||
*/
|
*/
|
||||||
public function handle(): void
|
public function handle(): void
|
||||||
{
|
{
|
||||||
(new Module)->whereHasBalance("0.01")->chunk(100, function ($modules) {
|
(new Module)->whereHasBalance('0.01')->chunk(100, function ($modules) {
|
||||||
foreach ($modules as $module) {
|
foreach ($modules as $module) {
|
||||||
$this->send($module);
|
$this->send($module);
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ public function hasBalance(string $amount = '0'): bool
|
|||||||
return bccomp($this->balance, $amount, 4) >= 0;
|
return bccomp($this->balance, $amount, 4) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function whereHasBalance(string $amount = "0"): self|Builder|CachedBuilder
|
public function whereHasBalance(string $amount = '0'): self|Builder|CachedBuilder
|
||||||
{
|
{
|
||||||
return $this->where('balance', '>=', $amount);
|
return $this->where('balance', '>=', $amount);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user