当前位置: 首页>>代码示例>>PHP>>正文


PHP CMS::backendPath方法代码示例

本文整理汇总了PHP中CMS::backendPath方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS::backendPath方法的具体用法?PHP CMS::backendPath怎么用?PHP CMS::backendPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMS的用法示例。


在下文中一共展示了CMS::backendPath方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if ($this->auth->check()) {
         return new RedirectResponse(url(\CMS::backendPath()));
     }
     return $next($request);
 }
开发者ID:BlueCatTAT,项目名称:kodicms-laravel,代码行数:14,代码来源:RedirectIfAuthenticated.php

示例2: handle

 /**
  * Handle an incoming request.
  *
  *
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if ($this->auth->guest()) {
         if ($request->ajax()) {
             throw new AuthenticateException('Unauthorized.');
         } else {
             return redirect()->guest(\CMS::backendPath() . '/auth/login');
         }
     }
     return $next($request);
 }
开发者ID:BlueCatTAT,项目名称:kodicms-laravel,代码行数:20,代码来源:Authenticate.php

示例3: __construct

 /**
  * @param Request $request
  * @param Response $response
  * return void
  */
 public function __construct(Request $request, Response $response, SessionStore $session, Guard $auth)
 {
     $this->request = $request;
     $this->response = $response;
     $this->session = $session;
     $this->currentUser = $auth->user();
     if (auth()->check()) {
         \Lang::setLocale($this->currentUser->locale);
     }
     $this->loginPath = \CMS::backendPath() . '/auth/login';
     // Execute method boot() on controller execute
     if (method_exists($this, 'boot')) {
         app()->call([$this, 'boot']);
     }
     if ($this->authRequired) {
         $this->beforeFilter('@checkPermissions');
     }
 }
开发者ID:BlueCatTAT,项目名称:kodicms-laravel,代码行数:23,代码来源:Controller.php

示例4: findActivePageByUri

 /**
  * @param string $currentUri
  * @return boolean
  */
 public function findActivePageByUri($currentUri)
 {
     $found = FALSE;
     $adminDirName = \CMS::backendPath();
     foreach ($this->getPages() as $page) {
         $url = $page->getUrl();
         $len = strpos($url, $adminDirName);
         if ($len !== FALSE) {
             $len += strlen($adminDirName);
         }
         $url = substr($url, $len);
         $len = strpos($currentUri, $adminDirName);
         if ($len !== FALSE) {
             $len += strlen($adminDirName);
         }
         $uri = substr($currentUri, $len);
         if (!empty($url) and strpos($uri, $url) !== FALSE) {
             $page->setStatus(TRUE);
             Collection::setCurrentPage($page);
             $found = TRUE;
             break;
         }
     }
     if ($found === FALSE) {
         foreach ($this->getSections() as $section) {
             $found = $section->findActivePageByUri($currentUri);
             if ($found !== FALSE) {
                 return $found;
             }
         }
     }
     return $found;
 }
开发者ID:BlueCatTAT,项目名称:kodicms-laravel,代码行数:37,代码来源:Section.php

示例5: function

<?php

Route::group(['prefix' => CMS::backendPath()], function () {
    Route::get('/', ['as' => 'backend.dashboard', 'uses' => 'DashboardController@index']);
    Route::get('/settings', ['as' => 'backend.settings', 'uses' => 'SystemController@settings']);
    Route::get('/about', ['as' => 'backend.about', 'uses' => 'SystemController@about']);
    Route::get('/phpinfo', ['as' => 'backend.phpinfo', 'uses' => 'SystemController@phpInfo']);
});
Route::post('/api.settings.update', ['as' => 'api.settings.update', 'uses' => 'API\\SettingsController@post']);
app('router')->before(function () {
    Route::group(['namespace' => 'KodiCMS\\CMS\\Http\\Controllers', 'prefix' => CMS::backendPath()], function () {
        Route::get('cms/{file}.{ext}', 'System\\VirtualMediaLinksController@find')->where('file', '.*')->where('ext', '(css|js|png|jpg|gif|otf|eot|svg|ttf|woff)');
        Route::get('{slug}', ['as' => 'backendError', 'uses' => 'System\\ErrorController@show'])->where('slug', '(.*)?');
    });
});
开发者ID:BlueCatTAT,项目名称:kodicms-laravel,代码行数:15,代码来源:routes.php

示例6: function

<?php

Route::group(['prefix' => \CMS::backendPath()], function () {
    Route::get('user/{id}/edit', ['as' => 'backend.user.edit', 'uses' => 'UserController@getEdit'])->where('id', '[0-9]+');
    Route::post('user/{id}/edit', ['as' => 'backend.user.edit.post', 'uses' => 'UserController@postEdit'])->where('id', '[0-9]+');
    Route::get('user/{id}/delete', ['as' => 'backend.user.delete', 'uses' => 'UserController@getDelete'])->where('id', '[0-9]+');
    Route::get('user/{id}/profile', ['as' => 'backend.user.profile', 'uses' => 'UserController@getProfile'])->where('id', '[0-9]+');
    Route::get('user/profile', ['as' => 'backend.user.current_profile', 'uses' => 'UserController@getProfile']);
    Route::controller('user', 'UserController', ['getIndex' => 'backend.user.list', 'getCreate' => 'backend.user.create', 'postCreate' => 'backend.user.create.post']);
    Route::get('role/{id}/edit', ['as' => 'backend.role.edit', 'uses' => 'RoleController@getEdit'])->where('id', '[0-9]+');
    Route::post('role/{id}/edit', ['as' => 'backend.role.edit.post', 'uses' => 'RoleController@postEdit'])->where('id', '[0-9]+');
    Route::get('role/{id}/delete', ['as' => 'backend.role.delete', 'uses' => 'RoleController@getDelete'])->where('id', '[0-9]+');
    Route::controller('role', 'RoleController', ['getIndex' => 'backend.role.list', 'getCreate' => 'backend.role.create', 'postCreate' => 'backend.role.create.post']);
    Route::controller('message', 'MessageController', ['getIndex' => 'backend.message.list', 'getCreate' => 'backend.message.create', 'postCreate' => 'backend.message.create.post', 'getRead' => 'backend.message.read']);
    Route::controller('auth', 'Auth\\AuthController', ['getLogin' => 'auth.login', 'getLogout' => 'auth.logout', 'postLogin' => 'auth.login.post']);
    Route::controller('password', 'Auth\\PasswordController', ['getEmail' => 'auth.password', 'postEmail' => 'auth.password.post']);
});
Route::get('/api.user.list', ['as' => 'api.user.list.get', 'uses' => 'API\\UserController@getUsers']);
Route::get('/api.user.like', ['as' => 'api.user.like.get', 'uses' => 'API\\UserController@getLike']);
Route::get('/api.user.roles', ['as' => 'api.user.roles.get', 'uses' => 'API\\UserController@getRoles']);
Route::get('/api.roles', ['as' => 'api.roles.get', 'uses' => 'API\\RoleController@getAll']);
Route::get('/api.user.meta', ['as' => 'api.user.meta.get', 'uses' => 'API\\UserMetaController@getData']);
Route::post('/api.user.meta', ['as' => 'api.user.meta.post', 'uses' => 'API\\UserMetaController@postData']);
Route::delete('/api.user.meta', ['as' => 'api.user.meta.delete', 'uses' => 'API\\UserMetaController@deleteData']);
Route::post('/api.user.message', ['as' => 'api.user.message.post', 'uses' => 'API\\UserMessageController@postMessage']);
Route::delete('/api.user.message', ['as' => 'api.user.message.delete', 'uses' => 'API\\UserMessageController@deleteMessage']);
开发者ID:BlueCatTAT,项目名称:kodicms-laravel,代码行数:26,代码来源:routes.php

示例7: registerMedia

 public function registerMedia()
 {
     $this->templateScripts = ['CURRENT_URL' => $this->request->url(), 'SITE_URL' => url(), 'BASE_URL' => url(\CMS::backendPath()), 'BACKEND_PATH' => \CMS::backendPath(), 'BACKEND_RESOURCES' => \CMS::backendResourcesURL(), 'PUBLIC_URL' => url(), 'LOCALE' => \Lang::getLocale(), 'ROUTE' => $this->getRouter()->currentRouteAction(), 'ROUTE_PATH' => $this->getRouterPath(), 'USER_ID' => \Auth::id(), 'MESSAGE_ERRORS' => view()->shared('errors')->getBag('default'), 'MESSAGE_SUCCESS' => (array) $this->session->get('success', [])];
 }
开发者ID:BlueCatTAT,项目名称:kodicms-laravel,代码行数:4,代码来源:TemplateController.php


注:本文中的CMS::backendPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。