本文整理汇总了PHP中AppHelper::getNameSpace方法的典型用法代码示例。如果您正苦于以下问题:PHP AppHelper::getNameSpace方法的具体用法?PHP AppHelper::getNameSpace怎么用?PHP AppHelper::getNameSpace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppHelper
的用法示例。
在下文中一共展示了AppHelper::getNameSpace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
public static function create()
{
self::$urls = \Config::get('panel.panelControllers');
$config = \Serverfireteam\Panel\Link::allCached();
$dashboard = array();
$appHelper = new AppHelper();
// Make Dashboard Items
foreach ($config as $value) {
$modelName = $value['url'];
if (in_array($modelName, self::$urls)) {
$model = "Serverfireteam\\Panel\\" . $modelName;
} else {
$model = $appHelper->getNameSpace() . $modelName;
}
//if (class_exists($value)) {
if ($value['show_menu']) {
$user = \Auth::guard('panel')->user();
if (!$user->hasRole('super')) {
if (!\Auth::guard('panel')->user()->hasPermission($modelName . 'all')) {
continue;
}
}
$dashboard[] = array('modelName' => $modelName, 'title' => $value['display'], 'count' => $model::count(), 'showListUrl' => 'panel/' . $modelName . '/all', 'addUrl' => 'panel/' . $modelName . '/edit');
}
}
return $dashboard;
}
示例2: create
public static function create()
{
self::$urls = \Config::get('panel.panelControllers');
$config = \Serverfireteam\Panel\Link::all();
$dashboard = array();
// Make Dashboard Items
foreach ($config as $key => $value) {
$modelName = $value['url'];
if (in_array($modelName, self::$urls)) {
$model = "Serverfireteam\\Panel\\" . $modelName;
} else {
$appHelper = new AppHelper();
$model = $appHelper->getNameSpace() . $modelName;
}
//if (class_exists($value)) {
$dashboard[] = array('title' => $value['display'], 'count' => $model::all()->count(), 'showListUrl' => 'panel/' . $modelName . '/all', 'addUrl' => 'panel/' . $modelName . '/edit');
}
return $dashboard;
}