diff --git a/app/Livewire/Pages/Analytics/Index.php b/app/Livewire/Pages/Analytics/Index.php new file mode 100644 index 0000000..959cd60 --- /dev/null +++ b/app/Livewire/Pages/Analytics/Index.php @@ -0,0 +1,14 @@ +layout('layouts.nimuli-app', ['title' => 'Analytics']); + } +} diff --git a/app/Livewire/Pages/Billing/Index.php b/app/Livewire/Pages/Billing/Index.php new file mode 100644 index 0000000..868f11e --- /dev/null +++ b/app/Livewire/Pages/Billing/Index.php @@ -0,0 +1,14 @@ +layout('layouts.nimuli-app', ['title' => 'Billing']); + } +} diff --git a/app/Livewire/Pages/Bio/Index.php b/app/Livewire/Pages/Bio/Index.php new file mode 100644 index 0000000..f1f3a78 --- /dev/null +++ b/app/Livewire/Pages/Bio/Index.php @@ -0,0 +1,14 @@ +layout('layouts.nimuli-app', ['title' => 'Bio Pages']); + } +} diff --git a/app/Livewire/Pages/Domains/Index.php b/app/Livewire/Pages/Domains/Index.php new file mode 100644 index 0000000..e0e7c80 --- /dev/null +++ b/app/Livewire/Pages/Domains/Index.php @@ -0,0 +1,14 @@ +layout('layouts.nimuli-app', ['title' => 'Domains']); + } +} diff --git a/app/Livewire/Pages/Links/Index.php b/app/Livewire/Pages/Links/Index.php new file mode 100644 index 0000000..63ac65c --- /dev/null +++ b/app/Livewire/Pages/Links/Index.php @@ -0,0 +1,56 @@ +resetPage(); + } + + public function updatingStatusFilter(): void + { + $this->resetPage(); + } + + public function deleteLink(int $id, DeleteLink $action): void + { + $workspace = app('current_workspace'); + $link = Link::where('id', $id) + ->where('workspace_id', $workspace->id) + ->firstOrFail(); + + $this->authorize('update', $workspace); + $action->handle($link); + $this->resetPage(); + } + + public function render(): \Illuminate\View\View + { + $workspace = app('current_workspace'); + + $links = Link::where('workspace_id', $workspace->id) + ->when($this->search, fn($q) => $q->where(function ($q) { + $q->where('title', 'like', "%{$this->search}%") + ->orWhere('slug', 'like', "%{$this->search}%") + ->orWhere('target_url', 'like', "%{$this->search}%"); + })) + ->when($this->statusFilter, fn($q) => $q->where('status', $this->statusFilter)) + ->latest() + ->paginate(20); + + return view('livewire.pages.links.index', compact('links')) + ->layout('layouts.nimuli-app', ['title' => 'Links']); + } +} diff --git a/app/Livewire/Pages/QrCodes/Index.php b/app/Livewire/Pages/QrCodes/Index.php new file mode 100644 index 0000000..9440f04 --- /dev/null +++ b/app/Livewire/Pages/QrCodes/Index.php @@ -0,0 +1,14 @@ +layout('layouts.nimuli-app', ['title' => 'QR Codes']); + } +} diff --git a/app/Livewire/Pages/Settings/Index.php b/app/Livewire/Pages/Settings/Index.php new file mode 100644 index 0000000..022a7d7 --- /dev/null +++ b/app/Livewire/Pages/Settings/Index.php @@ -0,0 +1,14 @@ +layout('layouts.nimuli-app', ['title' => 'Settings']); + } +} diff --git a/resources/views/livewire/pages/coming-soon.blade.php b/resources/views/livewire/pages/coming-soon.blade.php new file mode 100644 index 0000000..aab4a8a --- /dev/null +++ b/resources/views/livewire/pages/coming-soon.blade.php @@ -0,0 +1 @@ +
| Link | +Target | +Clicks | +Status | ++ |
|---|---|---|---|---|
|
+ {{ $link->slug }}
+ @if($link->title)
+ {{ $link->title }}
+ @endif
+ |
+ {{ $link->target_url }} | +0 | ++ + {{ $link->status }} + + | ++ + | +
| No links yet. Create your first link. | +||||