1. Go to this page and download the library: Download jackmartin/version 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/ */
namespace App\Exceptions;
use SyntaxEvolution\Version\Package\Version;
use Bugsnag\BugsnagLaravel\Facades\Bugsnag;
class Handler extends ExceptionHandler
{
public function report(Exception $exception)
{
if ($this->shouldReport($exception)) {
Bugsnag::setAppVersion((new Version())->format('version'));
Bugsnag::notifyException($exception);
}
}
}
text
$ php artisan version:minor
New minor version: 5
MyApp version 1.5.0 (build 701045)
text
$ php artisan version:refresh
Version was refreshed.
SyntaxEvolution version 1.0.0 (build 4f76c)