68 lines
2.0 KiB
PHP
Raw Normal View History

2014-05-14 23:24:20 +10:00
<?php namespace Backend\Controllers;
use BackendMenu;
use Backend\Classes\Controller;
use Backend\Widgets\ReportContainer;
/**
* Dashboard controller
*
* @package october\backend
* @author Alexey Bobkov, Samuel Georges
*
*/
class Index extends Controller
{
2014-10-24 17:38:24 +11:00
use \Backend\Traits\InspectableContainer;
2014-05-14 23:24:20 +10:00
public $requiredPermissions = ['backend.access_dashboard'];
/**
* Constructor.
*/
public function __construct()
{
parent::__construct();
BackendMenu::setContextOwner('October.Backend');
new ReportContainer($this);
2014-10-10 23:26:57 +02:00
/* @todo Remove line if year >= 2015 */
if (\Schema::hasColumn('backend_users', 'activated')) {
\Schema::table('backend_users', function ($table) {
$table->renameColumn('activated', 'is_activated');
});
}
/* @todo Remove line if year >= 2015 */
if (\Schema::hasColumn('backend_user_throttle', 'suspended')) {
\Schema::table('backend_user_throttle', function ($table) {
$table->renameColumn('suspended', 'is_suspended');
});
}
/* @todo Remove line if year >= 2015 */
if (\Schema::hasColumn('backend_user_throttle', 'banned')) {
\Schema::table('backend_user_throttle', function ($table) {
$table->renameColumn('banned', 'is_banned');
});
}
/* @todo Remove line if year >= 2015 */
if (\Schema::hasColumn('deferred_bindings', 'bind')) {
\Schema::table('deferred_bindings', function ($table) {
$table->renameColumn('bind', 'is_bind');
});
}
/* @todo Remove line if year >= 2015 */
if (\Schema::hasColumn('system_files', 'public')) {
\Schema::table('system_files', function ($table) {
$table->renameColumn('public', 'is_public');
});
}
2014-05-14 23:24:20 +10:00
}
public function index()
{
$this->pageTitle = 'backend::lang.dashboard.menu_label';
2014-05-14 23:24:20 +10:00
BackendMenu::setContextMainMenu('dashboard');
}
2014-10-10 23:26:57 +02:00
}