public function index()
 {
     ListController::_loadLists(['limit' => ListController::getPerPageLimit()]);
     $pageTitle = Config::get('siteConfig')['main']['siteTitle'];
     $pageDescription = Config::get('siteConfig')['main']['siteDescription'];
     $ogTitle = $pageTitle;
     $ogDescription = $pageDescription;
     $ogImage = '';
     try {
         $ogTitle = Config::get('siteConfig')['main']['ogData']['siteOgTitle'];
         $ogDescription = Config::get('siteConfig')['main']['ogData']['siteOgDescription'];
         $ogImage = asset(Config::get('siteConfig')['main']['ogData']['siteOgImage']);
     } catch (Exception $e) {
     }
     return View::make('home')->with(array('title' => $pageTitle, 'ogTitle' => $ogTitle, 'description' => $pageDescription, 'ogDescription' => $ogDescription, 'ogImage' => $ogImage));
 }
예제 #2
0
    Route::match(array('GET', 'POST'), 'admin/config/list', array('as' => 'adminConfigList', 'uses' => 'AdminConfigController@listConfig'));
    Route::match(array('GET', 'POST'), 'admin/config/email', array('as' => 'adminConfigEmail', 'uses' => 'AdminConfigController@emailConfig'));
    //Preview OG image
    Route::match(array('GET', 'POST'), 'admin/config/preview-og-image', array('as' => 'adminPreviewOgImage', 'uses' => 'AdminConfigController@previewOgImage'));
    //Change Password
    Route::match(array('GET', 'POST'), 'admin/change-password', array('as' => 'adminChangePassword', 'uses' => 'AdminController@changePassword'));
    //Users
    Route::controller('admin/users', 'AdminUsersController');
    Route::match(array('GET', 'POST'), 'admin/users/', array('as' => 'adminUsersHome', 'uses' => 'AdminUsersController@index'));
    //Categories
    Route::match(array('GET', 'POST'), 'admin/categories', array('as' => 'adminCategories', 'uses' => 'AdminCategoriesController@view'));
    Route::match(array('GET', 'POST', 'PATCH', 'DELETE'), 'admin/categories/addEdit', array('as' => 'adminCategoriesAddEdit', 'uses' => 'AdminCategoriesController@addEdit'));
    //Update
    Route::get('admin/update', array('as' => 'update', 'uses' => 'UpdateController@index'));
    //Sitemap
    Route::controller('sitemap', 'AdminSitemapController');
});
//Media manager
Route::group(array(), function () {
    \Route::get('media', 'W3G\\MediaManager\\MediaManagerController@showStandalone');
    \Route::any('media/connector', array('as' => 'mediaConnector', 'uses' => 'W3G\\MediaManager\\MediaManagerController@connector'));
});
//404 macro
Response::macro('notFound', function ($value = null) {
    ListController::_loadLists();
    return Response::view('errors.404', array('errorMsg' => strtoupper($value)), 404);
});
App::missing(function ($exception) {
    ListController::_loadLists();
    return Response::view('errors.404', array('errorMsg' => strtoupper($exception->getMessage())), 404);
});