chore: code refactor via rector
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\ActivationKey;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ActivationKey>
|
||||
* @extends Factory<ActivationKey>
|
||||
*/
|
||||
class ActivationKeyFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Blog;
|
||||
use App\Models\Category;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Blog>
|
||||
* @extends Factory<Blog>
|
||||
*/
|
||||
class BlogFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Category;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Category>
|
||||
* @extends Factory<Category>
|
||||
*/
|
||||
class CategoryFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Email;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Email>
|
||||
* @extends Factory<Email>
|
||||
*/
|
||||
class EmailFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Log;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Log>
|
||||
* @extends Factory<Log>
|
||||
*/
|
||||
class LogFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Menu;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Menu>
|
||||
* @extends Factory<Menu>
|
||||
*/
|
||||
class MenuFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Message;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Message>
|
||||
* @extends Factory<Message>
|
||||
*/
|
||||
class MessageFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -5,6 +5,9 @@ namespace Database\Factories;
|
||||
use App\Models\Meta;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<Meta>
|
||||
*/
|
||||
class MetaFactory extends Factory
|
||||
{
|
||||
protected $model = Meta::class;
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Page;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Page>
|
||||
* @extends Factory<Page>
|
||||
*/
|
||||
class PageFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Plan;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Plan>
|
||||
* @extends Factory<Plan>
|
||||
*/
|
||||
class PlanFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\PremiumEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\PremiumEmail>
|
||||
* @extends Factory<PremiumEmail>
|
||||
*/
|
||||
class PremiumEmailFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -5,6 +5,9 @@ namespace Database\Factories;
|
||||
use App\Models\RemoteEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<RemoteEmail>
|
||||
*/
|
||||
class RemoteEmailFactory extends Factory
|
||||
{
|
||||
protected $model = RemoteEmail::class;
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Setting>
|
||||
* @extends Factory<Setting>
|
||||
*/
|
||||
class SettingFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Ticket;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Ticket>
|
||||
* @extends Factory<Ticket>
|
||||
*/
|
||||
class TicketFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\TicketResponse;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\TicketResponse>
|
||||
* @extends Factory<TicketResponse>
|
||||
*/
|
||||
class TicketResponseFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\UsageLog;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\UsageLog>
|
||||
* @extends Factory<UsageLog>
|
||||
*/
|
||||
class UsageLogFactory extends Factory
|
||||
{
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
* @extends Factory<User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
@@ -38,7 +39,7 @@ class UserFactory extends Factory
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
return $this->state(fn (array $attributes): array => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
Schema::create('users', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
@@ -21,13 +21,13 @@ return new class extends Migration
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table): void {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
Schema::create('sessions', function (Blueprint $table): void {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
|
||||
@@ -11,13 +11,13 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('cache', function (Blueprint $table) {
|
||||
Schema::create('cache', function (Blueprint $table): void {
|
||||
$table->string('key')->primary();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
|
||||
Schema::create('cache_locks', function (Blueprint $table) {
|
||||
Schema::create('cache_locks', function (Blueprint $table): void {
|
||||
$table->string('key')->primary();
|
||||
$table->string('owner');
|
||||
$table->integer('expiration');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
Schema::create('jobs', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
@@ -21,7 +21,7 @@ return new class extends Migration
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
|
||||
Schema::create('job_batches', function (Blueprint $table) {
|
||||
Schema::create('job_batches', function (Blueprint $table): void {
|
||||
$table->string('id')->primary();
|
||||
$table->string('name');
|
||||
$table->integer('total_jobs');
|
||||
@@ -34,7 +34,7 @@ return new class extends Migration
|
||||
$table->integer('finished_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
Schema::create('failed_jobs', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->integer('level')->default(0)->after('id');
|
||||
});
|
||||
}
|
||||
@@ -21,7 +21,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->dropColumn('level');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
Schema::create('settings', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('app_name');
|
||||
$table->string('app_version')->default('1.0');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
Schema::table('settings', function (Blueprint $table): void {
|
||||
$table->json('imap_settings')->default('[]')->after('app_footer');
|
||||
});
|
||||
}
|
||||
@@ -21,7 +21,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
Schema::table('settings', function (Blueprint $table): void {
|
||||
$table->dropColumn('imap_settings');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
Schema::table('settings', function (Blueprint $table): void {
|
||||
$table->json('configuration_settings')->default('[]')->after('imap_settings');
|
||||
});
|
||||
}
|
||||
@@ -21,7 +21,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
Schema::table('settings', function (Blueprint $table): void {
|
||||
$table->dropColumn('configuration_settings');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
Schema::table('settings', function (Blueprint $table): void {
|
||||
$table->json('ads_settings')->default('[]')->after('configuration_settings');
|
||||
});
|
||||
}
|
||||
@@ -21,7 +21,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
Schema::table('settings', function (Blueprint $table): void {
|
||||
$table->dropColumn('ads_settings');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('metas', function (Blueprint $table) {
|
||||
Schema::create('metas', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('key');
|
||||
$table->text('value')->nullable();
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('logs', function (Blueprint $table) {
|
||||
Schema::create('logs', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('ip');
|
||||
$table->string('email');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('messages', function (Blueprint $table) {
|
||||
Schema::create('messages', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('subject');
|
||||
$table->string('from');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('emails', function (Blueprint $table) {
|
||||
Schema::create('emails', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('message_id')->unique()->index();
|
||||
$table->string('subject')->nullable();
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('pages', function (Blueprint $table) {
|
||||
Schema::create('pages', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('title');
|
||||
$table->string('slug');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('menus', function (Blueprint $table) {
|
||||
Schema::create('menus', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('url');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('categories', function (Blueprint $table) {
|
||||
Schema::create('categories', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('blogs', function (Blueprint $table) {
|
||||
Schema::create('blogs', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('post');
|
||||
$table->string('slug');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->string('stripe_id')->nullable()->index();
|
||||
$table->string('pm_type')->nullable();
|
||||
$table->string('pm_last_four', 4)->nullable();
|
||||
@@ -24,7 +24,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->dropIndex([
|
||||
'stripe_id',
|
||||
]);
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('subscriptions', function (Blueprint $table) {
|
||||
Schema::create('subscriptions', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('user_id');
|
||||
$table->string('type');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('subscription_items', function (Blueprint $table) {
|
||||
Schema::create('subscription_items', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('subscription_id');
|
||||
$table->string('stripe_id')->unique();
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('plans', function (Blueprint $table) {
|
||||
Schema::create('plans', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->text('description')->nullable();
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('usage_logs', function (Blueprint $table) {
|
||||
Schema::create('usage_logs', function (Blueprint $table): void {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->ipAddress('ip_address');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('logs', function (Blueprint $table) {
|
||||
Schema::table('logs', function (Blueprint $table): void {
|
||||
$table->unsignedBigInteger('user_id')->nullable()->after('id');
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
@@ -22,7 +22,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('logs', function (Blueprint $table) {
|
||||
Schema::table('logs', function (Blueprint $table): void {
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropColumn('user_id');
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('premium_emails', function (Blueprint $table) {
|
||||
Schema::create('premium_emails', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->string('message_id')->unique()->index();
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('activation_keys', function (Blueprint $table) {
|
||||
Schema::create('activation_keys', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->string('activation_key')->unique();
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('plans', function (Blueprint $table) {
|
||||
Schema::table('plans', function (Blueprint $table): void {
|
||||
$table->string('shoppy_product_id')->nullable()->after('pricing_id');
|
||||
$table->boolean('accept_stripe')->default(false)->after('shoppy_product_id');
|
||||
$table->boolean('accept_shoppy')->default(false)->after('accept_stripe');
|
||||
@@ -23,7 +23,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('plans', function (Blueprint $table) {
|
||||
Schema::table('plans', function (Blueprint $table): void {
|
||||
$table->dropColumn(['shoppy_product_id', 'accept_stripe', 'accept_shoppy']);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tickets', function (Blueprint $table) {
|
||||
Schema::create('tickets', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained()->onDelete('cascade');
|
||||
$table->string('ticket_id', 6)->unique();
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('ticket_responses', function (Blueprint $table) {
|
||||
Schema::create('ticket_responses', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('ticket_id')->constrained()->onDelete('cascade');
|
||||
$table->foreignId('user_id')->constrained()->onDelete('cascade');
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('plans', function (Blueprint $table) {
|
||||
Schema::table('plans', function (Blueprint $table): void {
|
||||
$table->string('oxapay_link')->nullable()->after('accept_shoppy');
|
||||
$table->boolean('accept_oxapay')->default(false)->after('oxapay_link');
|
||||
});
|
||||
@@ -22,7 +22,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('plans', function (Blueprint $table) {
|
||||
Schema::table('plans', function (Blueprint $table): void {
|
||||
$table->dropColumn(['oxapay_link', 'accept_oxapay']);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
|
||||
@@ -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