diff --git a/app/Http/Controllers/FilamentTypeController.php b/app/Http/Controllers/FilamentTypeController.php
new file mode 100644
index 0000000..1b458ef
--- /dev/null
+++ b/app/Http/Controllers/FilamentTypeController.php
@@ -0,0 +1,87 @@
+name = $request->name;
+ $type->description = $request->description;
+ $type->save();
+ return redirect()->route('types.index');
+ }
+
+ /**
+ * Display the specified resource.
+ */
+ public function show(string $id)
+ {
+ // Show Single Type
+ $type = FilamentType::find($id);
+
+
+ return view('types.show', compact('type'));
+ }
+
+ /**
+ * Show the form for editing the specified resource.
+ */
+ public function edit(string $id)
+ {
+ //
+ $type = FilamentType::find($id);
+ return view('types.edit', compact('type'));
+ }
+
+ /**
+ * Update the specified resource in storage.
+ */
+ public function update(Request $request, string $id)
+ {
+ // Store updated type
+ $type = FilamentType::find($id);
+ $type->name = $request->name;
+ $type->description = $request->description;
+ $type->save();
+ return redirect()->route('types.show', $type->id);
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ */
+ public function destroy(string $id)
+ {
+ // Delete Type
+ $type = FilamentType::find($id);
+ $type->delete();
+ return redirect()->route('types.index')->with('success','Type deleted successfully.');
+
+ }
+}
diff --git a/app/Livewire/CreateFilamentType.php b/app/Livewire/CreateFilamentType.php
new file mode 100644
index 0000000..1a4d9eb
--- /dev/null
+++ b/app/Livewire/CreateFilamentType.php
@@ -0,0 +1,26 @@
+only(['name', 'description'])
+ );
+ session()->flash('status', 'Filament Type Created Successfully.');
+ return redirect()->route('filamenttype.list');
+ }
+ public function render()
+ {
+ return view('filamenttype.create');
+ }
+}
diff --git a/app/Models/FilamentType.php b/app/Models/FilamentType.php
new file mode 100644
index 0000000..bbb0592
--- /dev/null
+++ b/app/Models/FilamentType.php
@@ -0,0 +1,15 @@
+id();
+ $table->timestamps();
+ $table->string('name');
+ $table->string('description');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::dropIfExists('filament_types');
+ }
+};
diff --git a/resources/css/app.css b/resources/css/app.css
index 5173eb6..0624d14 100644
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -11,6 +11,10 @@
--font-sans:
Inter, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
+
+ --color-accent: var(--color-rose-500);
+ --color-accent-content: var(--color-rose-500);
+ --color-accent-foreground: var(--color-white);
}
/*
@@ -31,6 +35,14 @@
}
}
+@layer theme {
+ .dark {
+ --color-accent: var(--color-rose-500);
+ --color-accent-content: var(--color-rose-400);
+ --color-accent-foreground: var(--color-white);
+ }
+}
+
[x-cloak] {
display: none;
}
diff --git a/resources/views/components/layouts/app.blade.php b/resources/views/components/layouts/app.blade.php
new file mode 100644
index 0000000..68ba638
--- /dev/null
+++ b/resources/views/components/layouts/app.blade.php
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+ {{ $title ?? 'Page Title' }}
+
+
+ {{ $slot }}
+
+
diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php
index 6ac7641..d2714d8 100644
--- a/resources/views/components/navbar.blade.php
+++ b/resources/views/components/navbar.blade.php
@@ -5,10 +5,10 @@
- Dashboard
- Hersteller
- Filamente
- Arten
+ Dashboard
+ Manufacturers
+ Filaments
+ Types
diff --git a/resources/views/flux/icon/ellipsis.blade.php b/resources/views/flux/icon/ellipsis.blade.php
new file mode 100644
index 0000000..9b1ccb2
--- /dev/null
+++ b/resources/views/flux/icon/ellipsis.blade.php
@@ -0,0 +1,43 @@
+{{-- Credit: Lucide (https://lucide.dev) --}}
+
+@props([
+ 'variant' => 'outline',
+])
+
+@php
+if ($variant === 'solid') {
+ throw new \Exception('The "solid" variant is not supported in Lucide.');
+}
+
+$classes = Flux::classes('shrink-0')
+ ->add(match($variant) {
+ 'outline' => '[:where(&)]:size-6',
+ 'solid' => '[:where(&)]:size-6',
+ 'mini' => '[:where(&)]:size-5',
+ 'micro' => '[:where(&)]:size-4',
+ });
+
+$strokeWidth = match ($variant) {
+ 'outline' => 2,
+ 'mini' => 2.25,
+ 'micro' => 2.5,
+};
+@endphp
+
+
diff --git a/resources/views/flux/icon/x.blade.php b/resources/views/flux/icon/x.blade.php
new file mode 100644
index 0000000..ce77b8c
--- /dev/null
+++ b/resources/views/flux/icon/x.blade.php
@@ -0,0 +1,42 @@
+{{-- Credit: Lucide (https://lucide.dev) --}}
+
+@props([
+ 'variant' => 'outline',
+])
+
+@php
+if ($variant === 'solid') {
+ throw new \Exception('The "solid" variant is not supported in Lucide.');
+}
+
+$classes = Flux::classes('shrink-0')
+ ->add(match($variant) {
+ 'outline' => '[:where(&)]:size-6',
+ 'solid' => '[:where(&)]:size-6',
+ 'mini' => '[:where(&)]:size-5',
+ 'micro' => '[:where(&)]:size-4',
+ });
+
+$strokeWidth = match ($variant) {
+ 'outline' => 2,
+ 'mini' => 2.25,
+ 'micro' => 2.5,
+};
+@endphp
+
+
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index f8d1d19..7f49286 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -28,7 +28,7 @@
@if (isset($header) || isset($headeraction))
-
+
@if (isset($header))
{{ $header }}
diff --git a/resources/views/types/create.blade.php b/resources/views/types/create.blade.php
new file mode 100644
index 0000000..9dbffb9
--- /dev/null
+++ b/resources/views/types/create.blade.php
@@ -0,0 +1,36 @@
+
+
+ {{ __('Create Types') }}
+
+
+
+
+
+
+
+
+
diff --git a/resources/views/types/edit.blade.php b/resources/views/types/edit.blade.php
new file mode 100644
index 0000000..1e1f14f
--- /dev/null
+++ b/resources/views/types/edit.blade.php
@@ -0,0 +1,30 @@
+
+
+ {{ __('Create Types') }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/views/types/index.blade.php b/resources/views/types/index.blade.php
new file mode 100644
index 0000000..ed72e7c
--- /dev/null
+++ b/resources/views/types/index.blade.php
@@ -0,0 +1,29 @@
+
+
+ {{ __('Types') }}
+
+
+
+
+
+
+
+
+
+
+ ID
Name
Options
+ @foreach ($types as $type)
+ -
+
{{ $type->id }}
+
+
+
+ @endforeach
+
+
+
+
+
+
diff --git a/resources/views/types/show.blade.php b/resources/views/types/show.blade.php
new file mode 100644
index 0000000..973c4a8
--- /dev/null
+++ b/resources/views/types/show.blade.php
@@ -0,0 +1,31 @@
+
+
+ {{ $type->name }}
+
+
+
+
+
+
+
+
+
+
+
Description
+
+ {{ $type->description }}
+
+
+
+
+
+
+
+
diff --git a/routes/web.php b/routes/web.php
index 0b90255..01985a5 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -1,6 +1,7 @@
group(function () {
+
+ // Dashboard
Route::get('/dashboard', function () {
return view('dashboard');
})->name('dashboard');
+
+ // Filament Types
+ Route::resource('types', FilamentTypeController::class);
+
});