Inquid Cloud VSCode Extension
A Visual Studio Code extension for working with Laravel Orion API routes and generating TypeScript models.
Features
- Load and parse Laravel Orion routes
- Generate TypeScript models from Laravel models
- Laravel Routes Panel - View all Laravel routes and Orion resources in a dedicated panel
- Authentication Panel - Detect authentication endpoints and generate AuthService.ts functions
- Configurable backend project path
- User-friendly settings interface
Installation
- Install the extension from the VSIX file
- Open the command palette (
Ctrl+Shift+P or Cmd+Shift+P )
- Run "Extensions: Install from VSIX..." and select the extension file
Configuration
Setting the Backend Project Path
The extension needs to know where your Laravel backend project is located. You can configure this in two ways:
Method 1: Using the Settings Page (Recommended)
- Open the command palette (
Ctrl+Shift+P or Cmd+Shift+P )
- Run "Inquid Cloud: Open Settings"
- Enter the path to your Laravel backend project root directory
- Click "Save Settings"
Method 2: Using VS Code Settings
- Open VS Code settings (
Ctrl+, or Cmd+, )
- Search for "Inquid Cloud"
- Set the "Backend Project Path" to your Laravel project root directory
Workspace vs User Settings
- Workspace Settings: The backend path is saved per workspace/project
- User Settings: The backend path is saved globally for all workspaces
Usage
Loading Routes
- Open the command palette (
Ctrl+Shift+P or Cmd+Shift+P )
- Run "Inquid Cloud: Load Routes"
- The extension will scan your Laravel routes and generate TypeScript models
- The Laravel Routes Panel will automatically open showing all discovered routes
Viewing Routes in the Panel
You can view Laravel routes in a dedicated panel that opens on the right side of the editor:
- Method 1: Use the command palette and run "Inquid Cloud: Open Routes Panel"
- Method 2: Right-click on a PHP file and select "Inquid Cloud: Open Routes Panel"
- Method 3: Click on the "Inquid Cloud" icon in the activity bar and then click "Laravel Routes"
The panel displays:
- Laravel Routes: All routes discovered by
php artisan route:list
- Orion Resources: Expandable Orion API resources showing all generated routes
- Click to expand each resource to see detailed routes (method, URI, name, action)
- 9 routes per resource: index, search, store, show, update, destroy, batchStore, batchUpdate, batchDestroy
- Statistics: Count of routes and resources found
- Refresh Button: Manually refresh the routes data
Authentication Panel
The Authentication Panel helps you manage authentication endpoints and generate AuthService.ts functions:
- Method 1: Use the command palette and run "Inquid Cloud: Open Auth Panel"
- Method 2: Click on the "Inquid Cloud" icon in the activity bar and then click "Authentication"
The panel displays:
- Available Endpoints: Authentication endpoints detected in your Laravel routes
- Grayed Out Endpoints: Endpoints not found in your routes (unavailable)
- Drag & Drop: Drag available endpoints to insert functions into AuthService.ts
- Copy/Insert Buttons: Copy function code to clipboard or insert directly into AuthService.ts
- Auto-Creation: Automatically creates
src/services/AuthService.ts if it doesn't exist
Supported Authentication Functions:
login - Authenticate user with email and password
logout - Logout authenticated user
forgotPassword - Send password reset link
resetPassword - Reset password with token
verifyTokenStatus - Verify authentication token
register - Register new user
refreshToken - Refresh authentication token
Commands
- Inquid Cloud: Load Routes - Scans Laravel routes and generates TypeScript models
- Inquid Cloud: Open Settings - Opens the settings page to configure the backend project path
- Inquid Cloud: Open Routes Panel - Opens the Laravel routes panel
- Inquid Cloud: Open Auth Panel - Opens the authentication panel
Requirements
- Visual Studio Code 1.80.0 or higher
- Laravel project with Orion API routes
- TypeScript support in your project
Troubleshooting
"No workspace folder found" Error
This error occurs when:
- No workspace is open in VS Code
- No backend project path is configured
Solution: Configure the backend project path using the settings page or VS Code settings.
"Error loading routes" Error
This error occurs when:
- The backend project path is incorrect
- The Laravel project structure is not as expected
- File permissions prevent reading the project files
Solution:
- Verify the backend project path is correct
- Ensure the Laravel project has the expected structure
- Check file permissions
Development
Building the Extension
npm install
npm run compile
Watching for Changes
npm run watch
Packaging
vsce package
License
This extension is licensed under the terms specified in the LICENSE file.
| |