change layout
This commit is contained in:
		| @@ -7,9 +7,11 @@ namespace Toby\Infrastructure\Http\Controllers; | ||||
| use Illuminate\Http\RedirectResponse; | ||||
| use Inertia\Response; | ||||
| use Toby\Eloquent\Models\Holiday; | ||||
| use Toby\Eloquent\Models\User; | ||||
| use Toby\Infrastructure\Http\Requests\HolidayRequest; | ||||
| use Toby\Infrastructure\Http\Resources\HolidayFormDataResource; | ||||
| use Toby\Infrastructure\Http\Resources\HolidayResource; | ||||
| use Toby\Infrastructure\Http\Resources\UserResource; | ||||
|  | ||||
| class HolidayController extends Controller | ||||
| { | ||||
| @@ -62,4 +64,19 @@ class HolidayController extends Controller | ||||
|             ->route("holidays.index") | ||||
|             ->with("success", __("Holiday has been deleted")); | ||||
|     } | ||||
|  | ||||
|     public function showCalendar(): Response | ||||
|     { | ||||
|             $users = User::query() | ||||
|                 ->withTrashed() | ||||
|                 ->orderBy("last_name") | ||||
|                 ->orderBy("first_name") | ||||
|                 ->paginate() | ||||
|                 ->withQueryString(); | ||||
|  | ||||
|             return inertia("Holidays/Calendar", [ | ||||
|                 "users" => UserResource::collection($users), | ||||
|             ]); | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user