Skip to content

Commit

Permalink
User edit route create
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed Jun 24, 2024
1 parent 2768719 commit aa0d3b6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
13 changes: 13 additions & 0 deletions app/Livewire/UserEdit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App\Livewire;

use Livewire\Component;

class UserEdit extends Component
{
public function render()
{
return view('livewire.user-edit');
}
}
8 changes: 6 additions & 2 deletions resources/views/livewire/manage-users.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</h1>
<div class="flex justify-end relative">
<input type="text" wire:model.live="search" class="w-full max-w-sm p-2 border border-gray-300 rounded-lg"
placeholder="Search Payments">
placeholder="Type to search...">
<i class="fas fa-search absolute top-3 right-3 text-gray-400"></i>
</div>
<table class="table my-4 ring-1 ring-blue-200 overflow-clip">
Expand All @@ -40,7 +40,11 @@ class="w-10 h-10 ring-1 ring-blue-200 rounded-full">
<td>{{ $user->email }}</td>
<td>{{ $user->role }}</td>
<td class="flex gap-2">
<button class="custom-btn">Edit</button>
<a href="{{ route('users.edit', $user->id) }}">
<button class="custom-btn">
Edit
</button>
</a>
<button class="custom-danger-btn">
Delete
</button>
Expand Down
3 changes: 3 additions & 0 deletions resources/views/livewire/user-edit.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div>
{{-- If your happiness depends on money, you will never be happy with yourself. --}}
</div>
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use App\Livewire\Orders;
use App\Livewire\OrderShow;
use App\Livewire\Referrals;
use App\Livewire\UserEdit;
use App\Livewire\VerifyOrderPayment;
use App\Livewire\VerifyPayments;
use Illuminate\Support\Facades\Route;
Expand Down Expand Up @@ -46,6 +47,7 @@
Route::get('/payments', VerifyPayments::class)->name('payments.index');
Route::get('/users', ManageUsers::class)->name('users.index');
Route::get('/users/{user}', [ManageUsers::class, 'show'])->name('users.show');
Route::get('/users/edit/{id}', UserEdit::class)->name('users.edit');

Route::get('/payments/{paymentId}', VerifyOrderPayment::class)->name('payments.show');
});
Expand Down

0 comments on commit aa0d3b6

Please sign in to comment.