user controller added

This commit is contained in:
2024-04-04 14:04:00 +05:45
parent df5a77ae94
commit d59affd0f7
6 changed files with 127 additions and 54 deletions

View File

@ -29,9 +29,10 @@ class UserController extends Controller
return redirect()->route('users.index');
}
public function index(UsersDataTable $dataTables)
public function index()
{
return $dataTables->render('users.index');
$users = User::latest()->get();
return view('users.index', compact('users'));
}
public function destroy(string $id)

View File

@ -1,26 +0,0 @@
<?php
namespace App\View\Components;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class application-logo extends Component
{
/**
* Create a new component instance.
*/
public function __construct()
{
//
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.application-logo');
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace App\View\Components;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class auth-session-status extends Component
{
/**
* Create a new component instance.
*/
public function __construct()
{
//
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.auth-session-status');
}
}