chore: code refactor via rector
This commit is contained in:
@@ -13,7 +13,7 @@ class AdminSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
User::create([
|
||||
User::query()->create([
|
||||
'name' => 'admin',
|
||||
'email' => 'admin@zemail.me',
|
||||
'password' => Hash::make('password'),
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use stdClass;
|
||||
use App\Models\Meta;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
@@ -12,12 +13,12 @@ class MetaSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$metas = new \stdClass;
|
||||
$metas = new stdClass;
|
||||
$metas->email_ids_created = 0;
|
||||
$metas->messages_received = 0;
|
||||
foreach ($metas as $key => $meta) {
|
||||
if (! Meta::where('key', $key)->exists()) {
|
||||
Meta::create([
|
||||
if (! Meta::query()->where('key', $key)->exists()) {
|
||||
Meta::query()->create([
|
||||
'key' => $key,
|
||||
'value' => $meta,
|
||||
]);
|
||||
|
||||
@@ -12,13 +12,13 @@ class UpdatePlansTableSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
Plan::where('id', 1)->update([
|
||||
Plan::query()->where('id', 1)->update([
|
||||
'shoppy_product_id' => 'MsYfrRX',
|
||||
'accept_stripe' => 1,
|
||||
'accept_shoppy' => 1,
|
||||
]);
|
||||
|
||||
Plan::where('id', 2)->update([
|
||||
Plan::query()->where('id', 2)->update([
|
||||
'shoppy_product_id' => '1oU5SNT',
|
||||
'accept_stripe' => 1,
|
||||
'accept_shoppy' => 1,
|
||||
|
||||
Reference in New Issue
Block a user