### Example React Component for Custom Dashboard Route Source: https://context7.com/blueprintframework/templates/llms.txt A sample React component that can be used for custom routes within the Blueprint dashboard. It imports a `PageContentBlock` and renders basic content. ```tsx // components/sections/ExampleSection.tsx - Custom route section import React from 'react'; import PageContentBlock from '@/components/elements/PageContentBlock'; const ExampleSection = () => { return ( <>

This is an example section.

); }; export default ExampleSection; ``` -------------------------------- ### Admin Controller with Database API (PHP) Source: https://context7.com/blueprintframework/templates/llms.txt Demonstrates how to use the Blueprint database API (`dbGet`, `dbSet`) within a PHP admin controller to store and retrieve extension configuration settings. Includes a form request for validation. ```php blueprint->dbGet('myextension', 'config:1'); $config_2 = $this->blueprint->dbGet('myextension', 'config:2'); $config_3 = $this->blueprint->dbGet('myextension', 'config:3'); // Set defaults if empty $defaultConfig1 = "hello, world"; $defaultConfig2 = "string input"; $defaultConfig3 = "#101010"; // Apply defaults if($config_1 == "") { $this->blueprint->dbSet('myextension', 'config:1', "$defaultConfig1"); $config_1 = $defaultConfig1; } if($config_2 == "") { $this->blueprint->dbSet('myextension', 'config:2', "$defaultConfig2"); $config_2 = $defaultConfig2; } if($config_3 == "") { $this->blueprint->dbSet('myextension', 'config:3', "$defaultConfig3"); $config_3 = $defaultConfig3; } return $this->view->make( 'admin.extensions.myextension.index', [ 'config_1' => $config_1, 'config_2' => $config_2, 'config_3' => $config_3, 'root' => "/admin/extensions/myextension", 'blueprint' => $this->blueprint, ] ); } public function update(myextensionSettingsFormRequest $request): RedirectResponse { foreach ($request->normalize() as $key => $value) { $this->settings->set('myextension::' . $key, $value); } return redirect()->route('admin.extensions.myextension.index'); } } class myextensionSettingsFormRequest extends AdminFormRequest { public function rules(): array { return [ 'config:1' => 'string', 'config:2' => 'string', 'config:3' => 'starts_with:#|string', ]; } public function attributes(): array { return [ 'config:1' => 'Config 1', 'config:2' => 'Config 2', 'config:3' => 'Config 3', ]; } } ``` -------------------------------- ### Register and Implement Console Commands with Scheduling Source: https://context7.com/blueprintframework/templates/llms.txt Defines custom Artisan console commands and their scheduling intervals using YAML for registration and PHP for implementation. Supports hourly, daily, weekly, or custom cron expressions. The PHP implementation includes logging and console output. ```yaml # console/Console.yml - Console command registration - { Signature: "byte", Description: "Example scheduled command", Path: "Byte.php", Interval: "hourly" } ``` ```php info("Command completed successfully"); ``` -------------------------------- ### Register React Components in Dashboard with YAML Source: https://context7.com/blueprintframework/templates/llms.txt Defines how extensions can register React components into various dashboard locations using a YAML configuration file. This allows for custom routes and UI elements within the dashboard. ```yaml # components/Components.yml - Component registration Navigation: NavigationBar: AdditionalItems: "elements/PlaceholderComponent" Routes: - { Name: "Example", Path: "/example", Type: "server", Component: "sections/ExampleSection", AdminOnly: "false" } Dashboard: ServerRow: ResourceLimits: "elements/TestElement" Authentication: Container: AfterContent: "elements/TestElement" ``` -------------------------------- ### Placeholder React Component for Navigation Injection Source: https://context7.com/blueprintframework/templates/llms.txt A simple React component intended for injection into navigation elements. It currently renders a basic placeholder text. ```tsx // components/elements/PlaceholderComponent.tsx - Navigation element import React from 'react'; const PlaceholderComponent = () => { return ( <>

This is a placeholder.

); }; export default PlaceholderComponent; ``` -------------------------------- ### Blueprint Extension Configuration (conf.yml) Source: https://context7.com/blueprintframework/templates/llms.txt Defines the metadata, admin views, dashboard integration, routing, and database migrations for a Blueprint extension. This YAML file is essential for Blueprint to register and manage the extension. ```yaml # conf.yml - Extension configuration file info: name: "My Extension" identifier: "myextension" description: "A custom Pterodactyl extension" flags: "" version: "1.0.0" target: "1.11.x" author: "Developer Name" icon: "" website: "https://example.com" admin: view: "admin/view.blade.php" controller: "admin/controller.php" css: "" wrapper: "" dashboard: css: "root.css" wrapper: "" components: "components" data: directory: "" public: "" console: "console" requests: views: "" app: "" routers: application: "" client: "" web: "" database: migrations: "" ``` -------------------------------- ### Admin Configuration Form with Laravel Blade Source: https://context7.com/blueprintframework/templates/llms.txt Renders a configuration form in the admin view using Laravel Blade. It supports various HTML input types and includes JavaScript for automatic save button visibility. The form utilizes CSRF protection and standard HTML form elements. ```php
{{ csrf_field() }}

Text Input

Input description

Dropdown Menu

Dropdown description

Color Picker

Color picker description

``` -------------------------------- ### Customize Dashboard Appearance with CSS Variables Source: https://context7.com/blueprintframework/templates/llms.txt Allows extensions to customize the Pterodactyl dashboard's appearance by defining CSS variables for colors and applying them to elements. This ensures consistent styling across the panel using a predefined color palette. ```css /* root.css - Dashboard theme customization */ :root { --neutral-900: hsla(210, 24%, 16%, 1); --neutral-800: hsla(209, 20%, 25%, 1); --neutral-700: hsla(209, 18%, 30%, 1); --neutral-600: hsla(209, 14%, 37%, 1); --neutral-500: hsla(211, 12%, 43%, 1); --primary-800: rgba(30, 64, 175, 1); --primary-700: rgba(29, 78, 216, 1); --primary-600: rgba(37, 99, 235, 1); --primary-500: rgba(59, 130, 246, 1); --green-600: rgba(22, 163, 74, 1); --green-500: rgba(34, 197, 94, 1); --red-600: rgba(220, 38, 38, 1); --red-500: rgba(239, 68, 68, 1); --yellow-500: rgba(234, 179, 8, 1); --cyan-500: rgba(6, 182, 212, 1); --black: rgba(19, 26, 32, 1); --white: rgba(255, 255, 255, 1); --transparent: transparent; } /* Apply custom colors */ .bg-primary-600 { background-color: var(--primary-600); } .bg-neutral-800 { background-color: var(--neutral-800); } .text-white { color: var(--white); } .text-neutral-300 { color: var(--neutral-300); } .border-primary-600 { border-color: var(--primary-600); } ``` -------------------------------- ### Test React Component for Dashboard Injection Source: https://context7.com/blueprintframework/templates/llms.txt A basic React component designed for injection into dashboard elements, such as server rows. It displays simple text content. ```tsx // components/elements/TestElement.tsx - Dashboard injection element import React from 'react'; const TestElement = () => { return ( <> hi world ); }; export default TestElement; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.