### Install Project Dependencies Source: https://github.com/dotkernel/api/blob/6.0/README.md Installs the project's dependencies using Composer, the dependency manager for PHP. This command should be run after cloning the project. ```shell composer install ``` -------------------------------- ### Get Help for Route Listing Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/route-list.md Displays detailed help information for the `route:list` command, including all available options and their usage. ```shell php ./bin/cli.php route:list --help ``` -------------------------------- ### Start PHP Built-in Server Source: https://github.com/dotkernel/api/blob/6.0/README.md Starts PHP's built-in web server on all network interfaces (0.0.0.0) on port 8080, serving files from the 'public' directory. This is used to run the Dotkernel API locally for testing. ```shell php -S 0.0.0.0:8080 -t public ``` -------------------------------- ### Get Doctrine Migrations Help Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/migrations-diff.md Displays help information for the Doctrine Migrations `diff` command, providing details on its usage and available options. ```shell vendor/bin/doctrine-migrations help diff ``` -------------------------------- ### Get Help for Admin Create Command Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/admin-create.md This command retrieves detailed help information for the `admin:create` command within the Dotkernel API CLI, providing insights into its options and usage. ```shell php ./bin/cli.php help admin:create ``` -------------------------------- ### API Home Page Response Source: https://github.com/dotkernel/api/blob/6.0/README.md The expected JSON response when sending a GET request to the Dotkernel API's home page (http://localhost:8080/). It confirms the API version. ```json { "message": "Dotkernel API version 6" } ``` -------------------------------- ### List Database Fixtures Source: https://github.com/dotkernel/api/blob/6.0/README.md Lists all available database fixtures for seeding the database with initial data. This command is useful for understanding the available fixtures before execution. ```shell php ./bin/doctrine fixtures:list ``` -------------------------------- ### Help Command for Token Generation in Dotkernel API Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/token-generate.md This command displays the help information for the token generation command in the Dotkernel API. It is useful for understanding available options and usage patterns. ```shell php ./bin/cli.php token:generate --help ``` -------------------------------- ### Execute All Database Fixtures Source: https://github.com/dotkernel/api/blob/6.0/README.md Executes all database fixtures to seed the database with initial values. This should be run after database migrations have been completed. ```shell php ./bin/doctrine fixtures:execute ``` -------------------------------- ### Clone Dotkernel API Project Source: https://github.com/dotkernel/api/blob/6.0/README.md This command clones the Dotkernel API project from its GitHub repository into the current directory. Ensure the directory is empty before execution. ```shell git clone https://github.com/dotkernel/api.git . ``` -------------------------------- ### Run Database Migrations Source: https://github.com/dotkernel/api/blob/6.0/README.md Executes database migrations for the Dotkernel API project using Doctrine Migrations. This command applies schema changes to the database. Ensure database connection parameters are correctly configured in `config/autoload/local.php`. ```shell php ./vendor/bin/doctrine-migrations migrate ``` -------------------------------- ### Enable Development Mode Source: https://github.com/dotkernel/api/blob/6.0/README.md Enables development mode for the Dotkernel API project using Composer. This mode is intended for development environments only and should not be used in production. ```shell composer development-enable ``` -------------------------------- ### Create Admin Account via CLI Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/admin-create.md This snippet demonstrates how to create an admin account using the Dotkernel API's command-line interface. It requires specifying an identity (username or email) and a password. Special characters in the identity or password should be enclosed in double quotes. ```shell php ./bin/cli.php admin:create -i {IDENTITY} -p {PASSWORD} ``` ```shell php ./bin/cli.php admin:create --identity {IDENTITY} --password {PASSWORD} ``` -------------------------------- ### Execute Specific Database Fixture Source: https://github.com/dotkernel/api/blob/6.0/README.md Executes a specific database fixture by its class name. Replace `FixtureClassName` with the actual name of the fixture class you wish to execute. ```shell php ./bin/doctrine fixtures:execute --class=FixtureClassName ``` -------------------------------- ### List Dotkernel API Routes Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/route-list.md This command lists all available API endpoints within a Dotkernel application. It extracts realtime endpoint information and displays it in a tabular format. ```shell php ./bin/cli.php route:list ``` -------------------------------- ### Generate Migration Diff Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/migrations-diff.md Generates a new database migration file using the Doctrine Migrations library. This command creates a diff between your current database schema and your mapping information. ```shell vendor/bin/doctrine-migrations diff ``` -------------------------------- ### Generate Migration Diff Excluding Multiple Table Patterns (Windows) Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/migrations-diff.md Generates a database migration file excluding multiple table patterns on Windows. The filter-expression concatenates patterns with a pipe (|) to exclude tables prefixed with 'foo_' and 'bar_'. ```shell vendor/bin/doctrine-migrations diff --filter-expression="/^(?!foo_|bar_)/" ``` -------------------------------- ### Generate Migration Diff Excluding Multiple Table Patterns (Linux/macOS) Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/migrations-diff.md Generates a database migration file excluding multiple table patterns on Linux/macOS. The filter-expression concatenates patterns with a pipe (|) to exclude tables prefixed with 'foo_' and 'bar_'. ```shell vendor/bin/doctrine-migrations diff --filter-expression='/^(?!foo_|bar_)/' ``` -------------------------------- ### Check Development Mode Status Source: https://github.com/dotkernel/api/blob/6.0/README.md Checks the current development mode status of the Dotkernel API project using Composer. This command helps verify if development mode is currently enabled or disabled. ```shell composer development-status ``` -------------------------------- ### Generate Migration Diff Excluding Tables (Windows) Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/migrations-diff.md Generates a database migration file while excluding tables that match the provided regular expression. This is particularly useful for preventing the dropping of unmapped tables like 'oauth_*' on Windows systems. ```shell vendor/bin/doctrine-migrations diff --filter-expression="/^(?!oauth_)/" ``` -------------------------------- ### Clear Dotkernel API Config Cache Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/token-generate.md This command clears the application's configuration cache, which is necessary after updating configuration files, especially when dealing with sensitive information like API tokens. ```shell php ./bin/clear-config-cache.php ``` -------------------------------- ### Generate Migration Diff Excluding Tables (Linux/macOS) Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/migrations-diff.md Generates a database migration file while excluding tables that match the provided regular expression. This command uses single quotes for the filter expression, suitable for Linux and macOS environments to prevent dropping unmapped tables like 'oauth_*'. ```shell vendor/bin/doctrine-migrations diff --filter-expression='/^(?!oauth_)/' ``` -------------------------------- ### Filter Dotkernel API Routes by Method Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/route-list.md Filters the list of API routes by specifying the HTTP request method. The filter is case-insensitive. ```shell php ./bin/cli.php route:list -m|--method[=METHOD] ``` -------------------------------- ### Filter Dotkernel API Routes by Name Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/route-list.md Filters the list of API routes by specifying a route name. The filter is case-insensitive. ```shell php ./bin/cli.php route:list -i|--name[=NAME] ``` -------------------------------- ### Filter Dotkernel API Routes by Path Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/route-list.md Filters the list of API routes by specifying a route path. The filter is case-insensitive. ```shell php ./bin/cli.php route:list -p|--path[=PATH] ``` -------------------------------- ### Disable Development Mode Source: https://github.com/dotkernel/api/blob/6.0/README.md Disables development mode for the Dotkernel API project using Composer. This is typically done when preparing the application for a production environment. ```shell composer development-disable ``` -------------------------------- ### Generate Error Reporting Token in Dotkernel API Source: https://github.com/dotkernel/api/blob/6.0/documentation/command/token-generate.md This snippet shows how to generate an error reporting token using the Dotkernel API CLI. It requires specifying 'error-reporting' as the token type. The generated token is then used to configure error handling in the application. ```shell php ./bin/cli.php token:generate error-reporting ``` ```php return [ // ... ErrorReportServiceInterface::class => [ // ... 'tokens' => [ '0123456789abcdef0123456789abcdef01234567', ], // ... ] ] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.