some migration stuff

This commit is contained in:
Lara 2024-11-05 22:35:01 +02:00
parent 8b6855adc9
commit b7a15753d4
3 changed files with 31 additions and 2 deletions

View file

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('is_admin')->default(false);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('is_admin');
});
}
};

View file

@ -1,9 +1,10 @@
<script lang="ts">
import { inertia, page } from '@inertiajs/svelte';
import { globalState } from "@/Library/PassState.svelte";
import type {Snippet} from "svelte";
//eslint-disable-next-line
let { children }: { children: any } = $props();
let { children }: { children: Snippet } = $props();
</script>
<div class="flex flex-col h-screen">

View file

@ -10,7 +10,7 @@
</script>
{#snippet title()}
<h1 class="text-2xl font-bold">Meow</h1>
<h1 class="text-4xl font-bold">Meowdy!</h1>
{/snippet}
<svelte:head>