Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
80f9f907
Commit
80f9f907
authored
Sep 22, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a sidebar view composer
parent
d4654fd3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
2 deletions
+22
-2
SidebarViewComposer.php
Composers/SidebarViewComposer.php
+15
-0
routes.php
Http/routes.php
+1
-1
composers.php
composers.php
+3
-0
start.php
start.php
+3
-1
No files found.
Composers/SidebarViewComposer.php
0 → 100644
View file @
80f9f907
<?php
namespace
Modules\Dashboard\Composers
;
class
SidebarViewComposer
{
public
function
compose
(
$view
)
{
$view
->
items
->
put
(
'dashboard'
,
[
'weight'
=>
0
,
'request'
=>
$view
->
prefix
,
'route'
=>
'dashboard.index'
,
'icon-class'
=>
'fa fa-dashboard'
,
'title'
=>
'Dashboard'
,
]);
}
}
\ No newline at end of file
Http/routes.php
View file @
80f9f907
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
Route
::
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
),
'namespace'
=>
'Modules\Dashboard\Http\Controllers'
],
function
()
Route
::
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
),
'namespace'
=>
'Modules\Dashboard\Http\Controllers'
],
function
()
{
{
Route
::
get
(
'/'
,
'Admin\DashboardController@index'
);
Route
::
get
(
'/'
,
[
'as'
=>
'dashboard.index'
,
'uses'
=>
'Admin\DashboardController@index'
]
);
});
});
\ No newline at end of file
composers.php
0 → 100644
View file @
80f9f907
<?php
View
::
composer
(
'core::partials.sidebar-nav'
,
'Modules\Dashboard\Composers\SidebarViewComposer'
);
\ No newline at end of file
start.php
View file @
80f9f907
...
@@ -25,4 +25,6 @@ Config::addNamespace('dashboard', __DIR__ . '/Config/');
...
@@ -25,4 +25,6 @@ Config::addNamespace('dashboard', __DIR__ . '/Config/');
|
|
*/
*/
require
__DIR__
.
'/Http/routes.php'
;
require
__DIR__
.
'/Http/routes.php'
;
\ No newline at end of file
require
__DIR__
.
'/composers.php'
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment