mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
fix(#103): add recipe options to remove bleed margin and enable dark mode
Some checks failed
tests / ci (push) Has been cancelled
Some checks failed
tests / ci (push) Has been cancelled
This commit is contained in:
parent
38e1b6f2a6
commit
80e2e8058a
4 changed files with 66 additions and 3 deletions
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('plugins', function (Blueprint $table): void {
|
||||
if (! Schema::hasColumn('plugins', 'no_bleed')) {
|
||||
$table->boolean('no_bleed')->default(false)->after('configuration_template');
|
||||
}
|
||||
if (! Schema::hasColumn('plugins', 'dark_mode')) {
|
||||
$table->boolean('dark_mode')->default(false)->after('no_bleed');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('plugins', function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('plugins', 'dark_mode')) {
|
||||
$table->dropColumn('dark_mode');
|
||||
}
|
||||
if (Schema::hasColumn('plugins', 'no_bleed')) {
|
||||
$table->dropColumn('no_bleed');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue