home-erp

git clone git://archive.git.mtrnord.blog/MTRNord/home-erp.git
Log | Files | Refs | README

commit 4b53df042c77ee9db7369280485b7dd2c4f7d93f
parent 85ebfb458b10e59e144ebab9f7c5b487848974bd
Author: MTRNord <mtrnord1@gmail.com>
Date:   Wed, 18 Oct 2023 19:54:44 +0200

Generate base models and add a way to generate tokens

Diffstat:
A.scribe/endpoints.cache/00.yaml | 567+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.scribe/endpoints/00.yaml | 565+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aapp/Http/Controllers/CabinetController.php | 10++++++++++
Aapp/Http/Controllers/CompartmentController.php | 10++++++++++
Aapp/Http/Controllers/RoomController.php | 32++++++++++++++++++++++++++++++++
Aapp/Models/Cabinet.php | 19+++++++++++++++++++
Aapp/Models/Compartment.php | 32++++++++++++++++++++++++++++++++
Aapp/Models/Room.php | 22++++++++++++++++++++++
Adatabase/migrations/2023_10_18_142931_create_rooms_table.php | 30++++++++++++++++++++++++++++++
Adatabase/migrations/2023_10_18_145921_create_cabinets_table.php | 30++++++++++++++++++++++++++++++
Adatabase/migrations/2023_10_18_160707_create_compartments_table.php | 33+++++++++++++++++++++++++++++++++
Alang/en/auth.php | 20++++++++++++++++++++
Alang/en/pagination.php | 19+++++++++++++++++++
Alang/en/passwords.php | 22++++++++++++++++++++++
Alang/en/tokens.php | 5+++++
Alang/en/validation.php | 185+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aresources/views/components/token-message.blade.php | 12++++++++++++
Aresources/views/livewire/profile/api-tokens.blade.php | 47+++++++++++++++++++++++++++++++++++++++++++++++
Mresources/views/profile.blade.php | 6++++++
Mresources/views/scribe/index.blade.php | 777++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mroutes/api.php | 7+++++--
Mroutes/web.php | 4++--
22 files changed, 2449 insertions(+), 5 deletions(-)

diff --git a/.scribe/endpoints.cache/00.yaml b/.scribe/endpoints.cache/00.yaml @@ -0,0 +1,567 @@ +## Autogenerated by Scribe. DO NOT MODIFY. + +name: Endpoints +description: '' +endpoints: + - + httpMethods: + - GET + uri: api/user + metadata: + groupName: Endpoints + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: '' + description: '' + authenticated: true + custom: [] + headers: + Authorization: 'Bearer {YOUR_AUTH_KEY}' + Content-Type: application/json + Accept: application/json + urlParameters: [] + cleanUrlParameters: [] + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + status: 200 + content: '{"id":1,"name":"MTRNord","email":"mtrnord@nordgedanken.dev","email_verified_at":null,"created_at":"2023-10-18T10:55:05.000000Z","updated_at":"2023-10-18T10:55:05.000000Z"}' + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '59' + access-control-allow-origin: '*' + description: null + custom: [] + responseFields: [] + auth: + - headers + - Authorization + - 'Bearer 15|cc3PlQdafhg0xhyGUwPQxyc8SOoOxwIyA1TAushU76aa56bc' + controller: null + method: null + route: null + custom: [] + - + httpMethods: + - GET + uri: 'api/room/{room_id}' + metadata: + groupName: Endpoints + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: '' + description: '' + authenticated: true + custom: [] + headers: + Authorization: 'Bearer {YOUR_AUTH_KEY}' + Content-Type: application/json + Accept: application/json + urlParameters: + room_id: + name: room_id + description: 'The ID of the room.' + required: true + example: architecto + type: string + enumValues: [] + custom: [] + cleanUrlParameters: + room_id: architecto + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + status: 500 + content: |- + { + "message": "App\\Http\\Controllers\\RoomController::get_room_json(): Return value must be of type App\\Models\\Room, null returned", + "exception": "TypeError", + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/app/Http/Controllers/RoomController.php", + "line": 30, + "trace": [ + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Controller.php", + "line": 54, + "function": "get_room_json", + "class": "App\\Http\\Controllers\\RoomController", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php", + "line": 43, + "function": "callAction", + "class": "Illuminate\\Routing\\Controller", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Route.php", + "line": 259, + "function": "dispatch", + "class": "Illuminate\\Routing\\ControllerDispatcher", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Route.php", + "line": 205, + "function": "runController", + "class": "Illuminate\\Routing\\Route", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 799, + "function": "run", + "class": "Illuminate\\Routing\\Route", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 141, + "function": "Illuminate\\Routing\\{closure}", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php", + "line": 50, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php", + "line": 159, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php", + "line": 125, + "function": "handleRequest", + "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php", + "line": 87, + "function": "handleRequestUsingNamedLimiter", + "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php", + "line": 57, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Auth\\Middleware\\Authenticate", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 116, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 798, + "function": "then", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 777, + "function": "runRouteWithinStack", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 741, + "function": "runRoute", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 730, + "function": "dispatchToRoute", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", + "line": 200, + "function": "dispatch", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 141, + "function": "Illuminate\\Foundation\\Http\\{closure}", + "class": "Illuminate\\Foundation\\Http\\Kernel", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php", + "line": 19, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php", + "line": 21, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php", + "line": 31, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php", + "line": 21, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php", + "line": 40, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php", + "line": 27, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php", + "line": 99, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php", + "line": 62, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Http\\Middleware\\HandleCors", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php", + "line": 39, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Http\\Middleware\\TrustProxies", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 116, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", + "line": 175, + "function": "then", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", + "line": 144, + "function": "sendRequestThroughRouter", + "class": "Illuminate\\Foundation\\Http\\Kernel", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 299, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Kernel", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 287, + "function": "callLaravelOrLumenRoute", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 92, + "function": "makeApiCall", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 45, + "function": "makeResponseCall", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 35, + "function": "makeResponseCallIfConditionsPass", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php", + "line": 209, + "function": "__invoke", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php", + "line": 163, + "function": "iterateThroughStrategies", + "class": "Knuckles\\Scribe\\Extracting\\Extractor", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php", + "line": 95, + "function": "fetchResponses", + "class": "Knuckles\\Scribe\\Extracting\\Extractor", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php", + "line": 124, + "function": "processRoute", + "class": "Knuckles\\Scribe\\Extracting\\Extractor", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php", + "line": 71, + "function": "extractEndpointsInfoFromLaravelApp", + "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php", + "line": 49, + "function": "extractEndpointsInfoAndWriteToDisk", + "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php", + "line": 51, + "function": "get", + "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php", + "line": 36, + "function": "handle", + "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/Util.php", + "line": 41, + "function": "Illuminate\\Container\\{closure}", + "class": "Illuminate\\Container\\BoundMethod", + "type": "::" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php", + "line": 93, + "function": "unwrapIfClosure", + "class": "Illuminate\\Container\\Util", + "type": "::" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php", + "line": 35, + "function": "callBoundMethod", + "class": "Illuminate\\Container\\BoundMethod", + "type": "::" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/Container.php", + "line": 662, + "function": "call", + "class": "Illuminate\\Container\\BoundMethod", + "type": "::" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Console/Command.php", + "line": 211, + "function": "call", + "class": "Illuminate\\Container\\Container", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Command/Command.php", + "line": 326, + "function": "execute", + "class": "Illuminate\\Console\\Command", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Console/Command.php", + "line": 180, + "function": "run", + "class": "Symfony\\Component\\Console\\Command\\Command", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Application.php", + "line": 1081, + "function": "run", + "class": "Illuminate\\Console\\Command", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Application.php", + "line": 320, + "function": "doRunCommand", + "class": "Symfony\\Component\\Console\\Application", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Application.php", + "line": 174, + "function": "doRun", + "class": "Symfony\\Component\\Console\\Application", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php", + "line": 201, + "function": "run", + "class": "Symfony\\Component\\Console\\Application", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/artisan", + "line": 35, + "function": "handle", + "class": "Illuminate\\Foundation\\Console\\Kernel", + "type": "->" + } + ] + } + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '58' + access-control-allow-origin: '*' + description: null + custom: [] + responseFields: [] + auth: + - headers + - Authorization + - 'Bearer 15|cc3PlQdafhg0xhyGUwPQxyc8SOoOxwIyA1TAushU76aa56bc' + controller: null + method: null + route: null + custom: [] diff --git a/.scribe/endpoints/00.yaml b/.scribe/endpoints/00.yaml @@ -0,0 +1,565 @@ +name: Endpoints +description: '' +endpoints: + - + httpMethods: + - GET + uri: api/user + metadata: + groupName: Endpoints + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: '' + description: '' + authenticated: true + custom: [] + headers: + Authorization: 'Bearer {YOUR_AUTH_KEY}' + Content-Type: application/json + Accept: application/json + urlParameters: [] + cleanUrlParameters: [] + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + status: 200 + content: '{"id":1,"name":"MTRNord","email":"mtrnord@nordgedanken.dev","email_verified_at":null,"created_at":"2023-10-18T10:55:05.000000Z","updated_at":"2023-10-18T10:55:05.000000Z"}' + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '59' + access-control-allow-origin: '*' + description: null + custom: [] + responseFields: [] + auth: + - headers + - Authorization + - 'Bearer 15|cc3PlQdafhg0xhyGUwPQxyc8SOoOxwIyA1TAushU76aa56bc' + controller: null + method: null + route: null + custom: [] + - + httpMethods: + - GET + uri: 'api/room/{room_id}' + metadata: + groupName: Endpoints + groupDescription: '' + subgroup: '' + subgroupDescription: '' + title: '' + description: '' + authenticated: true + custom: [] + headers: + Authorization: 'Bearer {YOUR_AUTH_KEY}' + Content-Type: application/json + Accept: application/json + urlParameters: + room_id: + name: room_id + description: 'The ID of the room.' + required: true + example: architecto + type: string + enumValues: [] + custom: [] + cleanUrlParameters: + room_id: architecto + queryParameters: [] + cleanQueryParameters: [] + bodyParameters: [] + cleanBodyParameters: [] + fileParameters: [] + responses: + - + status: 500 + content: |- + { + "message": "App\\Http\\Controllers\\RoomController::get_room_json(): Return value must be of type App\\Models\\Room, null returned", + "exception": "TypeError", + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/app/Http/Controllers/RoomController.php", + "line": 30, + "trace": [ + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Controller.php", + "line": 54, + "function": "get_room_json", + "class": "App\\Http\\Controllers\\RoomController", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php", + "line": 43, + "function": "callAction", + "class": "Illuminate\\Routing\\Controller", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Route.php", + "line": 259, + "function": "dispatch", + "class": "Illuminate\\Routing\\ControllerDispatcher", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Route.php", + "line": 205, + "function": "runController", + "class": "Illuminate\\Routing\\Route", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 799, + "function": "run", + "class": "Illuminate\\Routing\\Route", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 141, + "function": "Illuminate\\Routing\\{closure}", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php", + "line": 50, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php", + "line": 159, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php", + "line": 125, + "function": "handleRequest", + "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php", + "line": 87, + "function": "handleRequestUsingNamedLimiter", + "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php", + "line": 57, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Auth\\Middleware\\Authenticate", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 116, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 798, + "function": "then", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 777, + "function": "runRouteWithinStack", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 741, + "function": "runRoute", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php", + "line": 730, + "function": "dispatchToRoute", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", + "line": 200, + "function": "dispatch", + "class": "Illuminate\\Routing\\Router", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 141, + "function": "Illuminate\\Foundation\\Http\\{closure}", + "class": "Illuminate\\Foundation\\Http\\Kernel", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php", + "line": 19, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php", + "line": 21, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php", + "line": 31, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php", + "line": 21, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php", + "line": 40, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php", + "line": 27, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php", + "line": 99, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php", + "line": 62, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Http\\Middleware\\HandleCors", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php", + "line": 39, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 180, + "function": "handle", + "class": "Illuminate\\Http\\Middleware\\TrustProxies", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", + "line": 116, + "function": "Illuminate\\Pipeline\\{closure}", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", + "line": 175, + "function": "then", + "class": "Illuminate\\Pipeline\\Pipeline", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", + "line": 144, + "function": "sendRequestThroughRouter", + "class": "Illuminate\\Foundation\\Http\\Kernel", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 299, + "function": "handle", + "class": "Illuminate\\Foundation\\Http\\Kernel", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 287, + "function": "callLaravelOrLumenRoute", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 92, + "function": "makeApiCall", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 45, + "function": "makeResponseCall", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php", + "line": 35, + "function": "makeResponseCallIfConditionsPass", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php", + "line": 209, + "function": "__invoke", + "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php", + "line": 163, + "function": "iterateThroughStrategies", + "class": "Knuckles\\Scribe\\Extracting\\Extractor", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php", + "line": 95, + "function": "fetchResponses", + "class": "Knuckles\\Scribe\\Extracting\\Extractor", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php", + "line": 124, + "function": "processRoute", + "class": "Knuckles\\Scribe\\Extracting\\Extractor", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php", + "line": 71, + "function": "extractEndpointsInfoFromLaravelApp", + "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php", + "line": 49, + "function": "extractEndpointsInfoAndWriteToDisk", + "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php", + "line": 51, + "function": "get", + "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php", + "line": 36, + "function": "handle", + "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/Util.php", + "line": 41, + "function": "Illuminate\\Container\\{closure}", + "class": "Illuminate\\Container\\BoundMethod", + "type": "::" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php", + "line": 93, + "function": "unwrapIfClosure", + "class": "Illuminate\\Container\\Util", + "type": "::" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php", + "line": 35, + "function": "callBoundMethod", + "class": "Illuminate\\Container\\BoundMethod", + "type": "::" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/Container.php", + "line": 662, + "function": "call", + "class": "Illuminate\\Container\\BoundMethod", + "type": "::" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Console/Command.php", + "line": 211, + "function": "call", + "class": "Illuminate\\Container\\Container", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Command/Command.php", + "line": 326, + "function": "execute", + "class": "Illuminate\\Console\\Command", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Console/Command.php", + "line": 180, + "function": "run", + "class": "Symfony\\Component\\Console\\Command\\Command", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Application.php", + "line": 1081, + "function": "run", + "class": "Illuminate\\Console\\Command", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Application.php", + "line": 320, + "function": "doRunCommand", + "class": "Symfony\\Component\\Console\\Application", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Application.php", + "line": 174, + "function": "doRun", + "class": "Symfony\\Component\\Console\\Application", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php", + "line": 201, + "function": "run", + "class": "Symfony\\Component\\Console\\Application", + "type": "->" + }, + { + "file": "/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/artisan", + "line": 35, + "function": "handle", + "class": "Illuminate\\Foundation\\Console\\Kernel", + "type": "->" + } + ] + } + headers: + cache-control: 'no-cache, private' + content-type: application/json + x-ratelimit-limit: '60' + x-ratelimit-remaining: '58' + access-control-allow-origin: '*' + description: null + custom: [] + responseFields: [] + auth: + - headers + - Authorization + - 'Bearer 15|cc3PlQdafhg0xhyGUwPQxyc8SOoOxwIyA1TAushU76aa56bc' + controller: null + method: null + route: null + custom: [] diff --git a/app/Http/Controllers/CabinetController.php b/app/Http/Controllers/CabinetController.php @@ -0,0 +1,10 @@ +<?php + +namespace App\Http\Controllers; + +use Illuminate\Http\Request; + +class CabinetController extends Controller +{ + // +} diff --git a/app/Http/Controllers/CompartmentController.php b/app/Http/Controllers/CompartmentController.php @@ -0,0 +1,10 @@ +<?php + +namespace App\Http\Controllers; + +use Illuminate\Http\Request; + +class CompartmentController extends Controller +{ + // +} diff --git a/app/Http/Controllers/RoomController.php b/app/Http/Controllers/RoomController.php @@ -0,0 +1,32 @@ +<?php + +namespace App\Http\Controllers; + +use App\Models\Room; +use Illuminate\Http\Request; + +class RoomController extends Controller +{ + public function create(Request $request) + { + $room = new Room; + $room->name = $request->name; + $room->description = $request->description; + $room->save(); + } + + public function add_cabinet(Request $request, string $room_id) + { + $room = Room::find($room_id); + $room->cabinets()->create([ + "name" => $request->name, + "description" => $request->description + ]); + } + + public function get_room_json(string $room_id): Room + { + $room = Room::find($room_id); + return $room; + } +} diff --git a/app/Models/Cabinet.php b/app/Models/Cabinet.php @@ -0,0 +1,19 @@ +<?php + +namespace App\Models; + +use Illuminate\Database\Eloquent\Concerns\HasUuids; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\BelongsTo; + +class Cabinet extends Model +{ + use HasFactory; + use HasUuids; + + public function Room(): BelongsTo + { + return $this->belongsTo(Room::class); + } +} diff --git a/app/Models/Compartment.php b/app/Models/Compartment.php @@ -0,0 +1,32 @@ +<?php + +namespace App\Models; + +use Illuminate\Database\Eloquent\Concerns\HasUuids; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Relations\HasMany; + +class Compartment extends Model +{ + use HasFactory; + use HasUuids; + + /** + * Get the subcompartments in a compartment. + * + * This can for example be boxes in that area which further divide it + */ + public function sub_compartments(): HasMany + { + return $this->hasMany(Compartment::class); + } + + + + public function cabinet(): BelongsTo + { + return $this->belongsTo(Cabinet::class); + } +} diff --git a/app/Models/Room.php b/app/Models/Room.php @@ -0,0 +1,22 @@ +<?php + +namespace App\Models; + +use Illuminate\Database\Eloquent\Concerns\HasUuids; +use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\HasMany; + +class Room extends Model +{ + use HasFactory; + use HasUuids; + + /** + * Get the cabinets in a room. + */ + public function cabinets(): HasMany + { + return $this->hasMany(Cabinet::class); + } +} diff --git a/database/migrations/2023_10_18_142931_create_rooms_table.php b/database/migrations/2023_10_18_142931_create_rooms_table.php @@ -0,0 +1,30 @@ +<?php + +use \App\Models\Cabinet; +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +return new class extends Migration { + /** + * Run the migrations. + */ + public function up(): void + { + Schema::create('rooms', function (Blueprint $table) { + $table->id(); + $table->timestamps(); + $table->string("name"); + $table->string("description"); + $table->foreignIdFor(Cabinet::class)->nullable($value = true); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('rooms'); + } +}; diff --git a/database/migrations/2023_10_18_145921_create_cabinets_table.php b/database/migrations/2023_10_18_145921_create_cabinets_table.php @@ -0,0 +1,30 @@ +<?php + +use \App\Models\Room; +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +return new class extends Migration { + /** + * Run the migrations. + */ + public function up(): void + { + Schema::create('cabinets', function (Blueprint $table) { + $table->id(); + $table->timestamps(); + $table->string("name"); + $table->string("description"); + $table->foreignIdFor(Room::class); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('cabinets'); + } +}; diff --git a/database/migrations/2023_10_18_160707_create_compartments_table.php b/database/migrations/2023_10_18_160707_create_compartments_table.php @@ -0,0 +1,33 @@ +<?php + + +use \App\Models\Cabinet; +use \App\Models\Compartment; +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +return new class extends Migration { + /** + * Run the migrations. + */ + public function up(): void + { + Schema::create('compartments', function (Blueprint $table) { + $table->id(); + $table->timestamps(); + $table->string("name"); + $table->string("description"); + $table->foreignIdFor(Cabinet::class); + $table->foreignIdFor(Compartment::class)->nullable($value = true); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('compartments'); + } +}; diff --git a/lang/en/auth.php b/lang/en/auth.php @@ -0,0 +1,20 @@ +<?php + +return [ + + /* + |-------------------------------------------------------------------------- + | Authentication Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines are used during authentication for various + | messages that we need to display to the user. You are free to modify + | these language lines according to your application's requirements. + | + */ + + 'failed' => 'These credentials do not match our records.', + 'password' => 'The provided password is incorrect.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/lang/en/pagination.php b/lang/en/pagination.php @@ -0,0 +1,19 @@ +<?php + +return [ + + /* + |-------------------------------------------------------------------------- + | Pagination Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines are used by the paginator library to build + | the simple pagination links. You are free to change them to anything + | you want to customize your views to better match your application. + | + */ + + 'previous' => '&laquo; Previous', + 'next' => 'Next &raquo;', + +]; diff --git a/lang/en/passwords.php b/lang/en/passwords.php @@ -0,0 +1,22 @@ +<?php + +return [ + + /* + |-------------------------------------------------------------------------- + | Password Reset Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines are the default lines which match reasons + | that are given by the password broker for a password update attempt + | has failed, such as for an invalid token or invalid new password. + | + */ + + 'reset' => 'Your password has been reset.', + 'sent' => 'We have emailed your password reset link.', + 'throttled' => 'Please wait before retrying.', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that email address.", + +]; diff --git a/lang/en/tokens.php b/lang/en/tokens.php @@ -0,0 +1,5 @@ +<?php + +return [ + "token_created" => "Created token: :token" +]; diff --git a/lang/en/validation.php b/lang/en/validation.php @@ -0,0 +1,185 @@ +<?php + +return [ + + /* + |-------------------------------------------------------------------------- + | Validation Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines contain the default error messages used by + | the validator class. Some of these rules have multiple versions such + | as the size rules. Feel free to tweak each of these messages here. + | + */ + + 'accepted' => 'The :attribute field must be accepted.', + 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', + 'active_url' => 'The :attribute field must be a valid URL.', + 'after' => 'The :attribute field must be a date after :date.', + 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', + 'alpha' => 'The :attribute field must only contain letters.', + 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', + 'alpha_num' => 'The :attribute field must only contain letters and numbers.', + 'array' => 'The :attribute field must be an array.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute field must be a date before :date.', + 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute field must have between :min and :max items.', + 'file' => 'The :attribute field must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute field must be between :min and :max.', + 'string' => 'The :attribute field must be between :min and :max characters.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'can' => 'The :attribute field contains an unauthorized value.', + 'confirmed' => 'The :attribute field confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute field must be a valid date.', + 'date_equals' => 'The :attribute field must be a date equal to :date.', + 'date_format' => 'The :attribute field must match the format :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', + 'declined' => 'The :attribute field must be declined.', + 'declined_if' => 'The :attribute field must be declined when :other is :value.', + 'different' => 'The :attribute field and :other must be different.', + 'digits' => 'The :attribute field must be :digits digits.', + 'digits_between' => 'The :attribute field must be between :min and :max digits.', + 'dimensions' => 'The :attribute field has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', + 'email' => 'The :attribute field must be a valid email address.', + 'ends_with' => 'The :attribute field must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute field must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'array' => 'The :attribute field must have more than :value items.', + 'file' => 'The :attribute field must be greater than :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than :value.', + 'string' => 'The :attribute field must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute field must have :value items or more.', + 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than or equal to :value.', + 'string' => 'The :attribute field must be greater than or equal to :value characters.', + ], + 'image' => 'The :attribute field must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field must exist in :other.', + 'integer' => 'The :attribute field must be an integer.', + 'ip' => 'The :attribute field must be a valid IP address.', + 'ipv4' => 'The :attribute field must be a valid IPv4 address.', + 'ipv6' => 'The :attribute field must be a valid IPv6 address.', + 'json' => 'The :attribute field must be a valid JSON string.', + 'lowercase' => 'The :attribute field must be lowercase.', + 'lt' => [ + 'array' => 'The :attribute field must have less than :value items.', + 'file' => 'The :attribute field must be less than :value kilobytes.', + 'numeric' => 'The :attribute field must be less than :value.', + 'string' => 'The :attribute field must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute field must not have more than :value items.', + 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be less than or equal to :value.', + 'string' => 'The :attribute field must be less than or equal to :value characters.', + ], + 'mac_address' => 'The :attribute field must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute field must not have more than :max items.', + 'file' => 'The :attribute field must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute field must not be greater than :max.', + 'string' => 'The :attribute field must not be greater than :max characters.', + ], + 'max_digits' => 'The :attribute field must not have more than :max digits.', + 'mimes' => 'The :attribute field must be a file of type: :values.', + 'mimetypes' => 'The :attribute field must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute field must have at least :min items.', + 'file' => 'The :attribute field must be at least :min kilobytes.', + 'numeric' => 'The :attribute field must be at least :min.', + 'string' => 'The :attribute field must be at least :min characters.', + ], + 'min_digits' => 'The :attribute field must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute field must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute field format is invalid.', + 'numeric' => 'The :attribute field must be a number.', + 'password' => [ + 'letters' => 'The :attribute field must contain at least one letter.', + 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute field must contain at least one number.', + 'symbols' => 'The :attribute field must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], + 'present' => 'The :attribute field must be present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute field format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute field must match :other.', + 'size' => [ + 'array' => 'The :attribute field must contain :size items.', + 'file' => 'The :attribute field must be :size kilobytes.', + 'numeric' => 'The :attribute field must be :size.', + 'string' => 'The :attribute field must be :size characters.', + ], + 'starts_with' => 'The :attribute field must start with one of the following: :values.', + 'string' => 'The :attribute field must be a string.', + 'timezone' => 'The :attribute field must be a valid timezone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'uppercase' => 'The :attribute field must be uppercase.', + 'url' => 'The :attribute field must be a valid URL.', + 'ulid' => 'The :attribute field must be a valid ULID.', + 'uuid' => 'The :attribute field must be a valid UUID.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/views/components/token-message.blade.php b/resources/views/components/token-message.blade.php @@ -0,0 +1,12 @@ +@props(['on']) + +<div x-data="{ shown: false, timeout: null, message: '' }" x-init="@this.on('{{ $on }}', (event) => { + clearTimeout(timeout); + shown = true; + timeout = setTimeout(() => { shown = false }, 2000); + message = event.detail.token +})" x-show.transition.out.opacity.duration.1500ms="shown" + x-transition:leave.opacity.duration.1500ms style="display: none;" + {{ $attributes->merge(['class' => 'text-sm text-gray-600 dark:text-gray-400']) }}> + <p x-text="message"></p> +</div> diff --git a/resources/views/livewire/profile/api-tokens.blade.php b/resources/views/livewire/profile/api-tokens.blade.php @@ -0,0 +1,47 @@ +<?php + +use function Livewire\Volt\{state}; +use App\Models\User; +use Livewire\Volt\Component; + +new class extends Component { + public string $token_name = ''; + + public function createApiToken(): void + { + $user = auth()->user(); + $token = $user->createToken($this->token_name); + + session()->flash('created_token', $token->plainTextToken); + } +}; ?> + +<section class="space-y-6"> + <header> + <h2 class="text-lg font-medium text-gray-900 dark:text-gray-100"> + {{ __('Generate API tokens') }} + </h2> + + <p class="mt-1 text-sm text-gray-600 dark:text-gray-400"> + {{ __('Ensure you check who you will be sharing these with.') }} + </p> + </header> + <form wire:submit="createApiToken" class="mt-6 space-y-6"> + <div> + <x-input-label for="token_name" :value="__('Token Name')" /> + <x-text-input wire:model="token_name" id="token_name" name="token_name" type="text" class="mt-1 block w-full" + required autofocus autocomplete="token_name" /> + <x-input-error class="mt-2" :messages="$errors->get('token_name')" /> + </div> + <div class="flex items-center gap-4"> + <x-primary-button>{{ __('Create') }}</x-primary-button> + + @if (session('created_token')) + <div class="mr-3 text-sm text-gray-600 dark:text-gray-400"> + {{ __('tokens.token_created', ['token' => session('created_token')]) }} + </div> + @endif + </div> + </form> + +</section> diff --git a/resources/views/profile.blade.php b/resources/views/profile.blade.php @@ -24,6 +24,12 @@ <livewire:profile.delete-user-form /> </div> </div> + + <div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg"> + <div class="max-w-xl"> + <livewire:profile.api-tokens /> + </div> + </div> </div> </div> </x-app-layout> diff --git a/resources/views/scribe/index.blade.php b/resources/views/scribe/index.blade.php @@ -66,6 +66,19 @@ <a href="#authenticating-requests">Authenticating requests</a> </li> </ul> + <ul id="tocify-header-endpoints" class="tocify-header"> + <li class="tocify-item level-1" data-unique="endpoints"> + <a href="#endpoints">Endpoints</a> + </li> + <ul id="tocify-subheader-endpoints" class="tocify-subheader"> + <li class="tocify-item level-2" data-unique="endpoints-GETapi-user"> + <a href="#endpoints-GETapi-user">GET api/user</a> + </li> + <li class="tocify-item level-2" data-unique="endpoints-GETapi-room--room_id-"> + <a href="#endpoints-GETapi-room--room_id-">GET api/room/{room_id}</a> + </li> + </ul> + </ul> </div> <ul class="toc-footer" id="toc-footer"> @@ -93,7 +106,769 @@ <p>All authenticated endpoints are marked with a <code>requires authentication</code> badge in the documentation below.</p> <p>You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.</p> - + <h1 id="endpoints">Endpoints</h1> + + + + <h2 id="endpoints-GETapi-user">GET api/user</h2> + +<p> +<small class="badge badge-darkred">requires authentication</small> +</p> + + + +<span id="example-requests-GETapi-user"> +<blockquote>Example request:</blockquote> + + +<div class="bash-example"> + <pre><code class="language-bash">curl --request GET \ + --get "http://localhost/api/user" \ + --header "Authorization: Bearer {YOUR_AUTH_KEY}" \ + --header "Content-Type: application/json" \ + --header "Accept: application/json"</code></pre></div> + + +<div class="javascript-example"> + <pre><code class="language-javascript">const url = new URL( + "http://localhost/api/user" +); + +const headers = { + "Authorization": "Bearer {YOUR_AUTH_KEY}", + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers, +}).then(response =&gt; response.json());</code></pre></div> + +</span> + +<span id="example-responses-GETapi-user"> + <blockquote> + <p>Example response (200):</p> + </blockquote> + <details class="annotation"> + <summary style="cursor: pointer;"> + <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> + </summary> + <pre><code class="language-http">cache-control: no-cache, private +content-type: application/json +x-ratelimit-limit: 60 +x-ratelimit-remaining: 59 +access-control-allow-origin: * + </code></pre></details> <pre> + +<code class="language-json" style="max-height: 300px;">{ + &quot;id&quot;: 1, + &quot;name&quot;: &quot;MTRNord&quot;, + &quot;email&quot;: &quot;mtrnord@nordgedanken.dev&quot;, + &quot;email_verified_at&quot;: null, + &quot;created_at&quot;: &quot;2023-10-18T10:55:05.000000Z&quot;, + &quot;updated_at&quot;: &quot;2023-10-18T10:55:05.000000Z&quot; +}</code> + </pre> + </span> +<span id="execution-results-GETapi-user" hidden> + <blockquote>Received response<span + id="execution-response-status-GETapi-user"></span>: + </blockquote> + <pre class="json"><code id="execution-response-content-GETapi-user" + data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre> +</span> +<span id="execution-error-GETapi-user" hidden> + <blockquote>Request failed with error:</blockquote> + <pre><code id="execution-error-message-GETapi-user"> + +Tip: Check that you&#039;re properly connected to the network. +If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS. +You can check the Dev Tools console for debugging information.</code></pre> +</span> +<form id="form-GETapi-user" data-method="GET" + data-path="api/user" + data-authed="1" + data-hasfiles="0" + data-isarraybody="0" + autocomplete="off" + onsubmit="event.preventDefault(); executeTryOut('GETapi-user', this);"> + <h3> + Request&nbsp;&nbsp;&nbsp; + <button type="button" + style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" + id="btn-tryout-GETapi-user" + onclick="tryItOut('GETapi-user');">Try it out ⚡ + </button> + <button type="button" + style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" + id="btn-canceltryout-GETapi-user" + onclick="cancelTryOut('GETapi-user');" hidden>Cancel 🛑 + </button>&nbsp;&nbsp; + <button type="submit" + style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" + id="btn-executetryout-GETapi-user" + data-initial-text="Send Request 💥" + data-loading-text="⏱ Sending..." + hidden>Send Request 💥 + </button> + </h3> + <p> + <small class="badge badge-green">GET</small> + <b><code>api/user</code></b> + </p> + <h4 class="fancy-heading-panel"><b>Headers</b></h4> + <div style="padding-left: 28px; clear: unset;"> + <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp; +&nbsp; + &nbsp; + <input type="text" style="display: none" + name="Authorization" class="auth-value" data-endpoint="GETapi-user" + value="Bearer {YOUR_AUTH_KEY}" + data-component="header"> + <br> +<p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p> + </div> + <div style="padding-left: 28px; clear: unset;"> + <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp; +&nbsp; + &nbsp; + <input type="text" style="display: none" + name="Content-Type" data-endpoint="GETapi-user" + value="application/json" + data-component="header"> + <br> +<p>Example: <code>application/json</code></p> + </div> + <div style="padding-left: 28px; clear: unset;"> + <b style="line-height: 2;"><code>Accept</code></b>&nbsp;&nbsp; +&nbsp; + &nbsp; + <input type="text" style="display: none" + name="Accept" data-endpoint="GETapi-user" + value="application/json" + data-component="header"> + <br> +<p>Example: <code>application/json</code></p> + </div> + </form> + + <h2 id="endpoints-GETapi-room--room_id-">GET api/room/{room_id}</h2> + +<p> +<small class="badge badge-darkred">requires authentication</small> +</p> + + + +<span id="example-requests-GETapi-room--room_id-"> +<blockquote>Example request:</blockquote> + + +<div class="bash-example"> + <pre><code class="language-bash">curl --request GET \ + --get "http://localhost/api/room/architecto" \ + --header "Authorization: Bearer {YOUR_AUTH_KEY}" \ + --header "Content-Type: application/json" \ + --header "Accept: application/json"</code></pre></div> + + +<div class="javascript-example"> + <pre><code class="language-javascript">const url = new URL( + "http://localhost/api/room/architecto" +); + +const headers = { + "Authorization": "Bearer {YOUR_AUTH_KEY}", + "Content-Type": "application/json", + "Accept": "application/json", +}; + +fetch(url, { + method: "GET", + headers, +}).then(response =&gt; response.json());</code></pre></div> + +</span> + +<span id="example-responses-GETapi-room--room_id-"> + <blockquote> + <p>Example response (500):</p> + </blockquote> + <details class="annotation"> + <summary style="cursor: pointer;"> + <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> + </summary> + <pre><code class="language-http">cache-control: no-cache, private +content-type: application/json +x-ratelimit-limit: 60 +x-ratelimit-remaining: 58 +access-control-allow-origin: * + </code></pre></details> <pre> + +<code class="language-json" style="max-height: 300px;">{ + &quot;message&quot;: &quot;App\\Http\\Controllers\\RoomController::get_room_json(): Return value must be of type App\\Models\\Room, null returned&quot;, + &quot;exception&quot;: &quot;TypeError&quot;, + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/app/Http/Controllers/RoomController.php&quot;, + &quot;line&quot;: 30, + &quot;trace&quot;: [ + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Controller.php&quot;, + &quot;line&quot;: 54, + &quot;function&quot;: &quot;get_room_json&quot;, + &quot;class&quot;: &quot;App\\Http\\Controllers\\RoomController&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php&quot;, + &quot;line&quot;: 43, + &quot;function&quot;: &quot;callAction&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Controller&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Route.php&quot;, + &quot;line&quot;: 259, + &quot;function&quot;: &quot;dispatch&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\ControllerDispatcher&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Route.php&quot;, + &quot;line&quot;: 205, + &quot;function&quot;: &quot;runController&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Route&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php&quot;, + &quot;line&quot;: 799, + &quot;function&quot;: &quot;run&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Route&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 141, + &quot;function&quot;: &quot;Illuminate\\Routing\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Router&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php&quot;, + &quot;line&quot;: 50, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Middleware\\SubstituteBindings&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php&quot;, + &quot;line&quot;: 159, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php&quot;, + &quot;line&quot;: 125, + &quot;function&quot;: &quot;handleRequest&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Middleware\\ThrottleRequests&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php&quot;, + &quot;line&quot;: 87, + &quot;function&quot;: &quot;handleRequestUsingNamedLimiter&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Middleware\\ThrottleRequests&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Middleware\\ThrottleRequests&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php&quot;, + &quot;line&quot;: 57, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Auth\\Middleware\\Authenticate&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 116, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php&quot;, + &quot;line&quot;: 798, + &quot;function&quot;: &quot;then&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php&quot;, + &quot;line&quot;: 777, + &quot;function&quot;: &quot;runRouteWithinStack&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Router&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php&quot;, + &quot;line&quot;: 741, + &quot;function&quot;: &quot;runRoute&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Router&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Routing/Router.php&quot;, + &quot;line&quot;: 730, + &quot;function&quot;: &quot;dispatchToRoute&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Router&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php&quot;, + &quot;line&quot;: 200, + &quot;function&quot;: &quot;dispatch&quot;, + &quot;class&quot;: &quot;Illuminate\\Routing\\Router&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 141, + &quot;function&quot;: &quot;Illuminate\\Foundation\\Http\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Http\\Kernel&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php&quot;, + &quot;line&quot;: 19, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php&quot;, + &quot;line&quot;: 21, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php&quot;, + &quot;line&quot;: 31, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php&quot;, + &quot;line&quot;: 21, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php&quot;, + &quot;line&quot;: 40, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Http\\Middleware\\TrimStrings&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php&quot;, + &quot;line&quot;: 27, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php&quot;, + &quot;line&quot;: 99, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php&quot;, + &quot;line&quot;: 62, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Http\\Middleware\\HandleCors&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php&quot;, + &quot;line&quot;: 39, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Http\\Middleware\\TrustProxies&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php&quot;, + &quot;line&quot;: 116, + &quot;function&quot;: &quot;Illuminate\\Pipeline\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php&quot;, + &quot;line&quot;: 175, + &quot;function&quot;: &quot;then&quot;, + &quot;class&quot;: &quot;Illuminate\\Pipeline\\Pipeline&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php&quot;, + &quot;line&quot;: 144, + &quot;function&quot;: &quot;sendRequestThroughRouter&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Http\\Kernel&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php&quot;, + &quot;line&quot;: 299, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Http\\Kernel&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php&quot;, + &quot;line&quot;: 287, + &quot;function&quot;: &quot;callLaravelOrLumenRoute&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php&quot;, + &quot;line&quot;: 92, + &quot;function&quot;: &quot;makeApiCall&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php&quot;, + &quot;line&quot;: 45, + &quot;function&quot;: &quot;makeResponseCall&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php&quot;, + &quot;line&quot;: 35, + &quot;function&quot;: &quot;makeResponseCallIfConditionsPass&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php&quot;, + &quot;line&quot;: 209, + &quot;function&quot;: &quot;__invoke&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php&quot;, + &quot;line&quot;: 163, + &quot;function&quot;: &quot;iterateThroughStrategies&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\Extracting\\Extractor&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php&quot;, + &quot;line&quot;: 95, + &quot;function&quot;: &quot;fetchResponses&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\Extracting\\Extractor&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php&quot;, + &quot;line&quot;: 124, + &quot;function&quot;: &quot;processRoute&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\Extracting\\Extractor&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php&quot;, + &quot;line&quot;: 71, + &quot;function&quot;: &quot;extractEndpointsInfoFromLaravelApp&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php&quot;, + &quot;line&quot;: 49, + &quot;function&quot;: &quot;extractEndpointsInfoAndWriteToDisk&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php&quot;, + &quot;line&quot;: 51, + &quot;function&quot;: &quot;get&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php&quot;, + &quot;line&quot;: 36, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Knuckles\\Scribe\\Commands\\GenerateDocumentation&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/Util.php&quot;, + &quot;line&quot;: 41, + &quot;function&quot;: &quot;Illuminate\\Container\\{closure}&quot;, + &quot;class&quot;: &quot;Illuminate\\Container\\BoundMethod&quot;, + &quot;type&quot;: &quot;::&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php&quot;, + &quot;line&quot;: 93, + &quot;function&quot;: &quot;unwrapIfClosure&quot;, + &quot;class&quot;: &quot;Illuminate\\Container\\Util&quot;, + &quot;type&quot;: &quot;::&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php&quot;, + &quot;line&quot;: 35, + &quot;function&quot;: &quot;callBoundMethod&quot;, + &quot;class&quot;: &quot;Illuminate\\Container\\BoundMethod&quot;, + &quot;type&quot;: &quot;::&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Container/Container.php&quot;, + &quot;line&quot;: 662, + &quot;function&quot;: &quot;call&quot;, + &quot;class&quot;: &quot;Illuminate\\Container\\BoundMethod&quot;, + &quot;type&quot;: &quot;::&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Console/Command.php&quot;, + &quot;line&quot;: 211, + &quot;function&quot;: &quot;call&quot;, + &quot;class&quot;: &quot;Illuminate\\Container\\Container&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Command/Command.php&quot;, + &quot;line&quot;: 326, + &quot;function&quot;: &quot;execute&quot;, + &quot;class&quot;: &quot;Illuminate\\Console\\Command&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Console/Command.php&quot;, + &quot;line&quot;: 180, + &quot;function&quot;: &quot;run&quot;, + &quot;class&quot;: &quot;Symfony\\Component\\Console\\Command\\Command&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Application.php&quot;, + &quot;line&quot;: 1081, + &quot;function&quot;: &quot;run&quot;, + &quot;class&quot;: &quot;Illuminate\\Console\\Command&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Application.php&quot;, + &quot;line&quot;: 320, + &quot;function&quot;: &quot;doRunCommand&quot;, + &quot;class&quot;: &quot;Symfony\\Component\\Console\\Application&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/symfony/console/Application.php&quot;, + &quot;line&quot;: 174, + &quot;function&quot;: &quot;doRun&quot;, + &quot;class&quot;: &quot;Symfony\\Component\\Console\\Application&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php&quot;, + &quot;line&quot;: 201, + &quot;function&quot;: &quot;run&quot;, + &quot;class&quot;: &quot;Symfony\\Component\\Console\\Application&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + }, + { + &quot;file&quot;: &quot;/run/media/marcel/1ac60e61-e5e2-4157-9a7a-830801a3fb0b/projects/personal-erp/home-erp/artisan&quot;, + &quot;line&quot;: 35, + &quot;function&quot;: &quot;handle&quot;, + &quot;class&quot;: &quot;Illuminate\\Foundation\\Console\\Kernel&quot;, + &quot;type&quot;: &quot;-&gt;&quot; + } + ] +}</code> + </pre> + </span> +<span id="execution-results-GETapi-room--room_id-" hidden> + <blockquote>Received response<span + id="execution-response-status-GETapi-room--room_id-"></span>: + </blockquote> + <pre class="json"><code id="execution-response-content-GETapi-room--room_id-" + data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre> +</span> +<span id="execution-error-GETapi-room--room_id-" hidden> + <blockquote>Request failed with error:</blockquote> + <pre><code id="execution-error-message-GETapi-room--room_id-"> + +Tip: Check that you&#039;re properly connected to the network. +If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS. +You can check the Dev Tools console for debugging information.</code></pre> +</span> +<form id="form-GETapi-room--room_id-" data-method="GET" + data-path="api/room/{room_id}" + data-authed="1" + data-hasfiles="0" + data-isarraybody="0" + autocomplete="off" + onsubmit="event.preventDefault(); executeTryOut('GETapi-room--room_id-', this);"> + <h3> + Request&nbsp;&nbsp;&nbsp; + <button type="button" + style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" + id="btn-tryout-GETapi-room--room_id-" + onclick="tryItOut('GETapi-room--room_id-');">Try it out ⚡ + </button> + <button type="button" + style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" + id="btn-canceltryout-GETapi-room--room_id-" + onclick="cancelTryOut('GETapi-room--room_id-');" hidden>Cancel 🛑 + </button>&nbsp;&nbsp; + <button type="submit" + style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" + id="btn-executetryout-GETapi-room--room_id-" + data-initial-text="Send Request 💥" + data-loading-text="⏱ Sending..." + hidden>Send Request 💥 + </button> + </h3> + <p> + <small class="badge badge-green">GET</small> + <b><code>api/room/{room_id}</code></b> + </p> + <h4 class="fancy-heading-panel"><b>Headers</b></h4> + <div style="padding-left: 28px; clear: unset;"> + <b style="line-height: 2;"><code>Authorization</code></b>&nbsp;&nbsp; +&nbsp; + &nbsp; + <input type="text" style="display: none" + name="Authorization" class="auth-value" data-endpoint="GETapi-room--room_id-" + value="Bearer {YOUR_AUTH_KEY}" + data-component="header"> + <br> +<p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p> + </div> + <div style="padding-left: 28px; clear: unset;"> + <b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp; +&nbsp; + &nbsp; + <input type="text" style="display: none" + name="Content-Type" data-endpoint="GETapi-room--room_id-" + value="application/json" + data-component="header"> + <br> +<p>Example: <code>application/json</code></p> + </div> + <div style="padding-left: 28px; clear: unset;"> + <b style="line-height: 2;"><code>Accept</code></b>&nbsp;&nbsp; +&nbsp; + &nbsp; + <input type="text" style="display: none" + name="Accept" data-endpoint="GETapi-room--room_id-" + value="application/json" + data-component="header"> + <br> +<p>Example: <code>application/json</code></p> + </div> + <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> + <div style="padding-left: 28px; clear: unset;"> + <b style="line-height: 2;"><code>room_id</code></b>&nbsp;&nbsp; +<small>string</small>&nbsp; + &nbsp; + <input type="text" style="display: none" + name="room_id" data-endpoint="GETapi-room--room_id-" + value="architecto" + data-component="url"> + <br> +<p>The ID of the room. Example: <code>architecto</code></p> + </div> + </form> + + + </div> <div class="dark-box"> diff --git a/routes/api.php b/routes/api.php @@ -1,5 +1,6 @@ <?php +use App\Http\Controllers\RoomController; use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; @@ -14,6 +15,8 @@ use Illuminate\Support\Facades\Route; | */ -/* Route::middleware('auth:sanctum')->get('/user', function (Request $request) { +Route::middleware('auth:sanctum')->get('/user', function (Request $request) { return $request->user(); -}); */ +}); + +Route::middleware('auth:sanctum')->get('/room/{room_id}', [RoomController::class, 'get_room_json']); diff --git a/routes/web.php b/routes/web.php @@ -20,10 +20,10 @@ Route::get('/', function () { Route::view('dashboard', 'dashboard') ->middleware(['auth', 'verified']) - ->name('dashboard'); + ->name('dashboard')->lazy(); Route::view('profile', 'profile') ->middleware(['auth']) - ->name('profile'); + ->name('profile')->lazy(); require __DIR__ . '/auth.php';