Skip to content

Commit 24abcd0

Browse files
committed
added version constants
1 parent c6f949b commit 24abcd0

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

src/Darryldecode/Backend/Base/Registrar/Registrar.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
class Registrar {
1212

13+
/**
14+
* the laravel backend version
15+
*/
16+
const VERSION = '1.0';
17+
const VERSION_NAME = 'Alpha';
18+
1319
/**
1420
* backend active components
1521
*
@@ -210,4 +216,17 @@ public function getActiveWidgets()
210216
{
211217
return $this->activeWidgets;
212218
}
219+
220+
/**
221+
* returns the current version
222+
*
223+
* @return array
224+
*/
225+
public function getVersion()
226+
{
227+
return array(
228+
'version' => self::VERSION,
229+
'name' => self::VERSION_NAME,
230+
);
231+
}
213232
}

src/Darryldecode/Backend/Components/Dashboard/Controllers/DashboardController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public function index()
4949
*/
5050
public function info()
5151
{
52-
return view('dashboard::info');
52+
$version = app('backend')->getVersion();
53+
54+
return view('dashboard::info',compact('version'));
5355
}
5456
}

src/Darryldecode/Backend/Components/Dashboard/Views/info.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
<table class="table table-bordered">
1515
<tr>
1616
<td>Current Version</td>
17-
<td><label class="label label-info">0.1</label></td>
17+
<td><label class="label label-info">{{$version['version']}}</label></td>
1818
</tr>
1919
<tr>
2020
<td>Details</td>
21-
<td>Pre-Release</td>
21+
<td>{{$version['name']}}</td>
2222
</tr>
2323
<tr>
2424
<td>Documentation:</td>

0 commit comments

Comments
 (0)