Compare commits
3 Commits
1e9e95f35f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5310908b0c | |||
| 4b05b3db6d | |||
| df47a926e4 |
@@ -29,6 +29,8 @@ class AdminCommentSearch extends Component
|
||||
{
|
||||
$comment = Comment::where('id', (int) $commentId)->firstOrFail();
|
||||
$comment->delete();
|
||||
|
||||
cache()->flush();
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Models\Comment;
|
||||
use App\Models\User;
|
||||
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
use Livewire\Attributes\Url;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class AdminUserSearch extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
@@ -31,8 +30,7 @@ class AdminUserSearch extends Component
|
||||
$user = User::where('id', $userID)
|
||||
->firstOrFail();
|
||||
|
||||
DB::table('comments')
|
||||
->where('commenter_id', '=', $user->id)
|
||||
Comment::where('user_id', $user->id)
|
||||
->delete();
|
||||
|
||||
cache()->flush();
|
||||
|
||||
@@ -296,8 +296,8 @@
|
||||
<div class="pb-1 text-center w-full">
|
||||
<x-responsive-nav-link :href="route('login')">
|
||||
<div
|
||||
class="relative bg-blue-700 hover:bg-blue-600 text-white font-bold px-4 h-10 rounded text-center p-[10px]">
|
||||
<i class="fa-brands fa-discord"></i> {{ __('nav.login') }}
|
||||
class="relative bg-rose-700 hover:bg-rose-600 text-white font-bold px-4 h-10 rounded text-center p-[10px]">
|
||||
<i class="fa-solid fa-arrow-right-to-bracket"></i> {{ __('nav.login') }}
|
||||
</div>
|
||||
</x-responsive-nav-link>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user