PHP code example of ahmedessam / laravel-git-toolkit
1. Go to this page and download the library: Download ahmedessam/laravel-git-toolkit 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/ */
ahmedessam / laravel-git-toolkit example snippets
// GitRepositoryInterface for Git operations
app(GitRepositoryInterface::class)->getCurrentBranch();
// ConfigInterface for configuration access
app(ConfigInterface::class)->get('commit_types');
Event::listen(BranchCreated::class, function ($event) {
Log::info("Branch created: {$event->branchName}");
});
Event::listen(CommitPushed::class, function ($event) {
Log::info("Commit pushed: {$event->commitHash}");
});