Commit 384e365c authored by Nicolas Widart's avatar Nicolas Widart

Merge commit '8f1eb55f'

* commit '8f1eb55f':
  Squashed 'Modules/Dashboard/' changes from 32a9233..464aa5e
parents e14ceda8 8f1eb55f
<?php namespace Modules\Dashboard\Composers;
use Illuminate\View\View;
class SidebarViewComposer
{
public function compose($view)
public function compose(View $view)
{
$view->items->put('dashboard', [
'weight' => 0,
......@@ -12,4 +14,4 @@ class SidebarViewComposer
'title' => 'Dashboard',
]);
}
}
\ No newline at end of file
}
......@@ -2,4 +2,4 @@
return [
];
\ No newline at end of file
];
......@@ -3,4 +3,4 @@ return [
'dashboard' => [
'index'
]
];
\ No newline at end of file
];
......@@ -13,8 +13,8 @@ class DashboardDatabaseSeeder extends Seeder {
public function run()
{
Model::unguard();
// $this->call("OthersTableSeeder");
}
}
\ No newline at end of file
}
......@@ -9,4 +9,4 @@ class DashboardController extends AdminBaseController
{
return View::make('dashboard::admin.dashboard');
}
}
\ No newline at end of file
}
......@@ -6,4 +6,3 @@ $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Larav
$router->get('/', ['as' => 'dashboard.index', 'uses' => 'Admin\DashboardController@index']);
});
});
......@@ -45,4 +45,3 @@ class RouteServiceProvider extends ServiceProvider
}
}
......@@ -2,4 +2,4 @@
return [
'welcome-message' => 'Welcome on your admin dashboard'
];
\ No newline at end of file
];
......@@ -2,4 +2,4 @@
return [
'welcome-message' => 'Bienvenue sur votre dashboard'
];
\ No newline at end of file
];
......@@ -16,4 +16,4 @@
<p>{{ trans('dashboard::dashboard.welcome-message') }}</p>
</div>
</div>
@stop
\ No newline at end of file
@stop
<?php
<?php namespace Modules\Dashboard\Tests;
use Cartalyst\Sentinel\Laravel\Facades\Sentinel;
use Modules\Core\Tests\BaseTestCase;
class UrlTest extends TestCase
class UrlTest extends BaseTestCase
{
/** @test */
public function testDashboardAccessible()
......@@ -10,10 +11,6 @@ class UrlTest extends TestCase
$user = Sentinel::findById(4);
Sentinel::login($user);
$crawler = $this->client->request('GET', '/' . Config::get('core::core.admin-prefix'));
$this->assertTrue($this->client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('h1:contains("Dashboard")'));
$this->checkResponseIsOkAndContains(['GET', '/' . Config::get('core::core.admin-prefix')], 'h1:contains("Dashboard")');
}
}
<?php
View::composer('core::partials.sidebar-nav', 'Modules\Dashboard\Composers\SidebarViewComposer');
\ No newline at end of file
View::composer('core::partials.sidebar-nav', 'Modules\Dashboard\Composers\SidebarViewComposer');
# Dashboard Module
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/3616f9d8-1e5c-46c6-9058-13e916851254/mini.png)](https://insight.sensiolabs.com/projects/3616f9d8-1e5c-46c6-9058-13e916851254)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/?branch=master)
\ No newline at end of file
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/?branch=master)
......@@ -17,4 +17,4 @@ Lang::addNamespace('dashboard', __DIR__ . '/Resources/lang/');
Config::addNamespace('dashboard', __DIR__ . '/Config/');
require __DIR__ . '/composers.php';
\ No newline at end of file
require __DIR__ . '/composers.php';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment