Skip to content

Commit

Permalink
Added package version
Browse files Browse the repository at this point in the history
  • Loading branch information
Metallizzer committed Oct 15, 2019
1 parent 4ea0436 commit 59ddd28
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card">
<div class="card-header">Laravel Bench</div>
<div class="card-header">Laravel Bench v{{ app('bench')->version() }}</div>

<div class="card-body">
@if ($errors->any())
Expand Down
17 changes: 17 additions & 0 deletions src/Bench.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@

class Bench
{
/**
* The package version.
*
* @var string
*/
const VERSION = '1.1.0';

/**
* The Laravel application instance.
*
Expand Down Expand Up @@ -129,4 +136,14 @@ public function run($benchmark)

return $runner->getStats();
}

/**
* Get the version number of the package.
*
* @return string
*/
public function version()
{
return static::VERSION;
}
}

0 comments on commit 59ddd28

Please sign in to comment.