diff --git a/app/Livewire/Color/Index.php b/app/Livewire/Color/Index.php
new file mode 100644
index 0000000..9d7f4b8
--- /dev/null
+++ b/app/Livewire/Color/Index.php
@@ -0,0 +1,46 @@
+validate();
+
+ // Create the color
+ Color::create([
+ $this->all()
+ ]);
+
+ // Clear the form
+ $this->reset(['name', 'hex']);
+ }
+
+ public function delete(Color $color) {
+ @Auth::check();
+ $color->delete();
+ }
+ public function render()
+ {
+ return view('livewire.color.index', [
+ 'colors' => Color::paginate(10)
+ ]);
+ }
+}
diff --git a/app/Livewire/Dashboard.php b/app/Livewire/Dashboard.php
index 72b15ab..22b6318 100644
--- a/app/Livewire/Dashboard.php
+++ b/app/Livewire/Dashboard.php
@@ -4,7 +4,9 @@ namespace App\Livewire;
use Livewire\Component;
use App\Models\Manufacturer;
+use Livewire\Attributes\title;
+#[title('Dashboard')]
class Dashboard extends Component
{
public function render()
diff --git a/resources/views/components/header.blade.php b/resources/views/components/header.blade.php
index 75b0699..20ec7b1 100644
--- a/resources/views/components/header.blade.php
+++ b/resources/views/components/header.blade.php
@@ -1,5 +1,7 @@
-
+
+
{{ $slot }}
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/resources/views/components/layouts/app.blade.php b/resources/views/components/layouts/app.blade.php
index 7878251..2aceb1a 100644
--- a/resources/views/components/layouts/app.blade.php
+++ b/resources/views/components/layouts/app.blade.php
@@ -20,16 +20,17 @@
@livewireStyles
@fluxAppearance
- {{ $title . ' | ' . config('app.name', 'Laravel') ?? config('app.name', 'Laravel') }}
+ {{ $title . ' | ' . config('app.name') ?? config('app.name') }}
-
+
+
+
{{ $slot }}
-
-
+
+
- @stack('modals')
-
@livewireScripts
@fluxScripts
+
diff --git a/resources/views/livewire/color/index.blade.php b/resources/views/livewire/color/index.blade.php
new file mode 100644
index 0000000..ba58d27
--- /dev/null
+++ b/resources/views/livewire/color/index.blade.php
@@ -0,0 +1,43 @@
+
+
+ {{ __('Colors') }}
+
+
+
+
+
+
+
+
+ Name
+ Color
+ Hex
+
+
+
+
+ @foreach ($colors as $color)
+
+ {{ $color->name }}
+
+ {{ $color->hex }}
+
+
+ @endforeach
+
+
+
+ {{ $colors->links() }}
+
+
+
\ No newline at end of file
diff --git a/resources/views/livewire/dashboard.blade.php b/resources/views/livewire/dashboard.blade.php
index 2dce8f0..1383391 100644
--- a/resources/views/livewire/dashboard.blade.php
+++ b/resources/views/livewire/dashboard.blade.php
@@ -1,49 +1,41 @@
-
-
- {{ __('Dashboard') }}
-
-
-
-
-
-
-
-
-
-
- Manufacturers
-
- @foreach ($manufacturers as $manufacturer)
- {{ $manufacturer->name }}
- {{ $manufacturer->filament_count }}
- @endforeach
-
-
-
-
-
- Filaments
-
-
-
-
-
-
- Types
-
-
-
-
-
-
- Colors
-
-
-
-
-
-
+
+
+
+
+
+
+ Manufacturers
+
+ @foreach ($manufacturers as $manufacturer)
+ {{ $manufacturer->name }}
+ {{ $manufacturer->filament_count }}
+ @endforeach
+
+
+
+
+
+ Filaments
+
+
+
+
+
+
+ Types
+
+
+
+
+
+
+ Colors
+
+
+
-
+
+
+
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index 38dec6a..d008da1 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -9,6 +9,7 @@ use App\Http\Controllers\ManufacturerController;
use App\Livewire\Types\Index;
use App\Livewire\Dashboard;
+use App\Livewire\Color\Index;
Route::get('/', function () {
return view('welcome');
@@ -31,5 +32,6 @@ Route::middleware([
// Manufacturers
Route::resource('manufacturers', ManufacturerController::class);
Route::get('refresh', [ManufacturerController::class, 'refresh'])->name('refresh');
-
+
+ Route::get('colors', Index::class)->name('colors.index');
});