PHP code example of 42sol / laravel-youtrack-client
1. Go to this page and download the library: Download 42sol/laravel-youtrack-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
42sol / laravel-youtrack-client example snippets
'providers' => [
// other service providers
YouTrackClient\Providers\YouTrackClientProvider::class,
]
/**
* This will make routes:
* - /yt/projects
* - /yt/issues
* - ...
*/
Route::prefix('/yt')->group(function () {
YouTrackClient\YouTrackRoutes::apply();
});
use YouTrackClient\YouTrackClient;
class YoutrackTestController extends Controller
{
private YouTrackClient $client;
// YouTrackClient will be injected here
public function __construct(YouTrackClient $client)
{
$this->client = $client;
}
public function getProjects() {
return $this->client->getProjects();
}
}