Download the PHP package usermp/artisan-api without Composer
On this page you can find all versions of the php package usermp/artisan-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download usermp/artisan-api
More information about usermp/artisan-api
Files in usermp/artisan-api
Package artisan-api
Short Description artisan-api is a Laravel package that allows you to execute Artisan commands via an API route
License MIT
Informations about the package artisan-api
artisan-api
artisan-api is a Laravel package that allows you to execute Artisan commands via an API route. This package simplifies the process of managing your Laravel application's Artisan commands by providing a straightforward and easy-to-use API interface.
Installation
To install the artisan-api package, you can use Composer. Run the following command in your terminal:
After installing the package, you need to register the ArtisanServiceProvider in your Laravel application. To do this, add the service provider to the providers array in your file:
Next, publish the configuration file to customize the package's settings. Run the following command:
This will create a configuration file at .
Configuration
The configuration file allows you to customize the behavior of the artisan-api package. Below is the default configuration:
with_key
: Determines if an API key is required to execute commands. Default isfalse
.api_key
: The API key used for authentication whenwith_key
is set totrue
allowed_commands
: An array of allowed Artisan commands that can be executed via the API.
Usage
Running Artisan Commands via API You can run any Artisan command using the route. The request should be a POST request and include the command and its arguments in the request body.
Example Request