🔧 Installation
Please read carefully the instructions below and follow them step by step.
Install the package
You can install the package via composer:
composer require cslant/github-project-php
This will install the latest stable version of the package. The package will automatically register its service provider.
Verify Installation
After installation, you can verify that the package was installed correctly by running:
composer show cslant/github-project-php
You should see output similar to:
name : cslant/github-project-php
descrip. : A Laravel package for managing GitHub projects
keywords : github, project, laravel, webhook
versions : * v1.0.0
type : library
license : MIT License
...
Service Provider
The package will automatically register its service provider. So you don't need to manually add it to your config/app.php
.
Facade (Optional)
If you want to use the facade, add it to your config/app.php
:
'aliases' => [
// Other aliases...
'GitHubProject' => CSlant\GitHubProject\Facades\GitHubProjectFacade::class,
],
Publish configuration file
This is an optional step. If you don't publish the config file, the package will use the default configuration.
The config file contains the default configuration for the package. If you want to change the default configuration.
You can publish the configuration file with:
php artisan vendor:publish --provider="CSlant\GitHubProject\GithubProjectServiceProvider" --tag="config"
This is the default content of the config file for GitHub Project PHP:
$routePrefix = env('GITHUB_PROJECT_ROUTE_PREFIX', 'github-project');
return [
'name' => 'GitHubProject',
'route_prefix' => $routePrefix,
'github' => [
'access_token' => env('GITHUB_ACCESS_TOKEN', ''),
'graphql_url' => env('GITHUB_GRAPHQL_URL', 'https://api.github.com/graphql'),
],
'enable_status_comment' => env('GITHUB_PROJECT_ENABLE_STATUS_COMMENT', false),
'is_queue_enabled' => env('GITHUB_PROJECT_QUEUE_ENABLED', false),
'comment_aggregation_cache_key' => env('GITHUB_PROJECT_COMMENT_AGGREGATION_CACHE_KEY', 'github-project-comment-aggregation'),
'comment_aggregation_time' => env('GITHUB_PROJECT_COMMENT_AGGREGATION_TIME', 20),
];