This is a package for Laravel Nova which allows you to easily manage your Git.
- PHP >= 7.1
- Laravel application with Laravel Nova installed
shell_exec
function enabled (For running git log/checkout/pull commands). See usage
Install the package via composer:
$ composer require mastani/nova-git-manager
Register the tool in the tools
method of the NovaServiceProvider
:
// app/Providers/NovaServiceProvider.php
// ...
public function tools()
{
return [
// ...
new \Mastani\NovaGitManager\NovaGitManager,
];
}
If you want to change the "Git Path" or "Commit URL" you can publish the config file:
php artisan vendor:publish --provider="Mastani\NovaGitManager\ToolServiceProvider" --tag="config"
Now head over to "config/nova-git-manager.php" and you can change the value:
/*
|--------------------------------------------------------------------------
| Git root path
|--------------------------------------------------------------------------
|
| Determine the default Git root path
| Default is your project base path.
|
*/
'git_path' => base_path(),
/*
|--------------------------------------------------------------------------
| Commit base url
|--------------------------------------------------------------------------
|
| Determine the default Git commit url
| Example for Github: https://github.com/your_username/your_repository/commit/%s
| Example for Gitlab: https://gitlab.com/your_username/your_repository/-/commit/%s
|
*/
'commit_url' => 'https://github.com/your_username/your_repository/commit/%s'
The MIT License (MIT). Please see License File for more information.