/**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app['xero'] = $this->app->share(function ($app) {
         \ClassLoader::addDirectories(array(__DIR__ . '/PHP-Xero'));
         $config = $this->app['config']['xero'];
         return new \xero($config['key'], $config['secret'], $config['publicPath'], $config['privatePath'], $config['format']);
     });
 }
Example #2
0
 public function setUp()
 {
     parent::setUp();
     // enable route filters
     $this->app['router']->enableFilters();
     // create an artisan object for running migrations
     $artisan = $this->app->make('artisan');
     // run the migrations to create Sentry 2 tables
     $artisan->call('migrate', array('--database' => 'testbench', '--path' => '../vendor/cartalyst/sentry/src/migrations'));
     // run our migrations to update the Sentry 2 users table
     $artisan->call('migrate', array('--database' => 'testbench', '--path' => 'migrations'));
     // seed our database tables
     $artisan->call('migrate', array('--database' => 'testbench', '--path' => '../tests/seeds'));
     // Load models
     ClassLoader::addDirectories(array(realpath(__DIR__ . '/models')));
     ClassLoader::load('Foo');
     ClassLoader::load('Bar');
     ClassLoader::load('Baz');
 }
Example #3
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/controllers/admin', app_path() . '/controllers/aesthetics', app_path() . '/libraries', app_path() . '/components', app_path() . '/helpers'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #4
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array());
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a rotating log file setup which creates a new file each day.
|
*/
$logFile = 'log-' . php_sapi_name() . '.txt';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
Example #5
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/database/seeds'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #6
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/classes', app_path() . '/classes/abstract', app_path() . '/classes/interfaces'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #7
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/classes'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #8
0
    if ($exception instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException) {
        Log::error('NotFoundHttpException Route: ' . Request::url());
    }
    Log::error($exception);
});
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/presenters', app_path() . '/models', app_path() . '/libraries', app_path() . '/database/migrations', app_path() . '/database/seeds'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a rotating log file setup which creates a new file each day.
|
*/
$logFile = 'log-' . php_sapi_name() . '.txt';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
/*
|--------------------------------------------------------------------------
| Application Error Handler
Example #9
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/providers', app_path() . '/validators', app_path() . '/exceptions', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a rotating log file setup which creates a new file each day.
|
*/
$logFile = 'log-' . php_sapi_name() . '.txt';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
Example #10
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/controllers/admin', app_path() . '/controllers/site', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/services', app_path() . '/helpers'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #11
0
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/plugins'));
/*
|--------------------------------------------------------------------------
| Plugin registering
|--------------------------------------------------------------------------
|
| We want to add class support to any more complex classes with a subfolder
| structure, so we'll load in the directory /plugins as well as scanning
| the direct folder.
|
*/
ClassLoader::addDirectories(File::directories(app_path() . '/plugins'));
/*
|--------------------------------------------------------------------------
| Theme functions
|--------------------------------------------------------------------------
|
| Built on top of Laravel is our custom theme functions, we need to make
| sure they're all loaded so there's no errors
|
*/
$functions = array('metadata', 'theme', 'page');
foreach ($functions as $function) {
    require app_path() . '/functions/' . $function . '.php';
}
View::addNamespace('theme', 'public/themes/' . Metadata::item('theme', 'default'));
View::addLocation(get_theme_path('layouts'));
Example #12
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database', app_path() . '/libraries', app_path() . '/libraries/AllStats'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
$logFile = 'laravel.log';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
Example #13
0
<?php

/*
 |--------------------------------------------------------------------------
 | Register The Laravel Class Loader
 |--------------------------------------------------------------------------
 |
 | In addition to using Composer, you may use the Laravel class loader to
 | load your controllers and models. This is useful for keeping all of
 | your classes in the "global" namespace without Composer updating.
 |
*/
ClassLoader::addDirectories([app_path() . '/database/seeds']);
/*
 |--------------------------------------------------------------------------
 | Application Error Logger
 |--------------------------------------------------------------------------
 |
 | Here we will configure the error logger setup for the application which
 | is built on top of the wonderful Monolog library. By default we will
 | build a basic log file setup which creates a single file for logs.
 |
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
 |--------------------------------------------------------------------------
 | Application Error Handler
 |--------------------------------------------------------------------------
 |
 | Here you may handle any errors that occur in your application, including
 | logging them or displaying custom views for specific errors. You may
Example #14
0
<?php

use Illuminate\Database\Eloquent\ModelNotFoundException;
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/validation', app_path() . '/database/seeds', app_path() . '/biblioteca'));
Validator::resolver(function ($translator, $data, $rules, $messages) {
    return new CustomValidator($translator, $data, $rules, $messages);
});
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
Example #15
0
 *    See the GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with osu!web.  If not, see <http://www.gnu.org/licenses/>.
 */
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories([app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/lib', app_path() . '/traits']);
/*
|--------------------------------------------------------------------------
| Reponse::route() macro
|--------------------------------------------------------------------------
|
| Provides the ability to supply both AJAX and regular redirects at
| the same time. Will always generate relative Location headers,
| and will default to "home" ("/") if no route was found.
| IDs/params to pass to the URL can be passed in.
|
*/
Response::macro('route', function ($url, $ids = [], $params = null) {
    try {
        $url = URL::route($url, $ids, $absolute = false);
    } catch (Exception $e) {
Example #16
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/database/seeds', app_path() . '/repositories', app_path() . '/traits'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #17
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Module Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(__DIR__ . '/../commands', __DIR__ . '/../controllers', __DIR__ . '/../models', __DIR__ . '/../database/seeds'));
/*
|--------------------------------------------------------------------------
| Register The Module Namespaces
|--------------------------------------------------------------------------
|
| Here is you can register the namespace for this module.
| You may to edit this namespace if you want.
|
*/
View::addNamespace('usermanage', __DIR__ . '/../views/');
Lang::addNamespace('usermanage', __DIR__ . '/../lang/');
Config::addNamespace('usermanage', __DIR__ . '/../config/');
/*
|--------------------------------------------------------------------------
| Require Module Filters and Routes file.
|--------------------------------------------------------------------------
|
| Next, this module will load filters and routes file.
Example #18
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories([]);
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a rotating log file setup which creates a new file each day.
|
*/
// Log to files as standard
$logFile = 'log-' . php_sapi_name() . '.txt';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
// Log to the database asynchronously if available
Log::listen(function ($level, $message, $context) {
    if (Config::get('lanager/config.installed')) {
        // Save the php sapi and date, because the closure needs to be serialized
        $apiName = php_sapi_name();
Example #19
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/vnptcardcharging/Entries.php'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #20
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', require app_path() . '/helpers/frontend.php'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #21
0
 public function populateDb()
 {
     $config = (require "/../config/cms.php");
     extract($config);
     //addons
     //laracms
     $addon = new Addons();
     $addon->addon_name = 'laracms';
     $addon->addon_title = 'Core System Addon';
     $addon->icon_image = 'http://laravel.com/assets/img/logo-head.png';
     $addon->version = '1.0.1';
     $addon->author = 'bonweb';
     $addon->url = 'http://www.bonweb.gr';
     $addon->installed = 1;
     $addon->save();
     ClassLoader::addDirectories(array(public_path() . "/addons/laracms/controllers", public_path() . "/addons/laracms/models", public_path() . "/addons/laracms/helpers"));
     //add the screensaver setting
     $setting = new Settings();
     $setting->area = 'backend';
     $setting->section = 'laracms';
     $setting->setting_name = 'screensaver';
     $setting->setting_value = '60000';
     $setting->autoload = 1;
     $setting->save();
     //grid manager
     $addon = new Addons();
     $addon->addon_name = 'grid_manager';
     $addon->addon_title = 'Grid Manager';
     $addon->icon_image = 'http://laravel.com/assets/img/logo-head.png';
     $addon->version = '1.0.1';
     $addon->author = 'bonweb';
     $addon->url = 'http://www.bonweb.gr';
     $addon->installed = 1;
     $addon->save();
     ClassLoader::addDirectories(array(public_path() . "/addons/grid_manager/controllers", public_path() . "/addons/grid_manager/models", public_path() . "/addons/grid_manager/helpers"));
     require_once public_path() . "/addons/grid_manager/func.php";
     Event::fire('backend.addons.saveaddoninfo.grid_manager', array($addon));
     //themes
     $theme = new Themes();
     $theme->theme_name = 'lara';
     $theme->theme_title = 'LaraCMS Default Theme';
     $theme->icon_image = 'http://laravel.com/assets/img/logo-head.png';
     $theme->version = '1.0.1';
     $theme->author = 'bonweb';
     $theme->url = 'http://www.bonweb.gr';
     $theme->installed = 1;
     $theme->active = 1;
     $theme->save();
     //users
     $user = new User();
     $user->firstname = 'John';
     $user->lastname = 'Doe';
     $user->email = $config['admin_email'];
     $user->is_admin = '1';
     $pass = Commoner::generatePass('administrator', $config['admin_email']);
     $user->password = Hash::make($pass);
     $user->save();
     $this->info('Your Password is:' . $pass);
     //add the languages
     $lang = new Languages();
     $lang->code = 'en_US';
     $lang->title = 'English';
     $lang->image = "/uploads/flags/Englang.png";
     $lang->active = 1;
     $lang->save();
     $lang = new Languages();
     $lang->code = 'el_GR';
     $lang->title = 'Greek';
     $lang->image = "/uploads/flags/Greece.png";
     $lang->active = 1;
     $lang->save();
 }
Example #22
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/libs', app_path() . '/libs/functions', app_path() . '/libs/validators', app_path() . '/database/seeds'));
Validator::resolver(function ($translator, $data, $rules, $messages) {
    return new CustomValidator($translator, $data, $rules, $messages);
});
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
Example #23
0
|
| Below you will find the "before" and "after" events for the application
| which may be used to do any work before or after a request into your
| application. Here you may also register your custom route filters.
|
*/
App::before(function ($request) {
    Commoner::observe();
    //change the hash so no malware uses it
    Config::set('cms.installation_hash', '');
    $addonsNotInstalled = $addonsInstalled = $themesNotInstalled = $themesInstalled = array();
    $addons = Addons::all();
    $themes = Themes::all();
    foreach ($addons as $addon) {
        if ($addon->installed == 1) {
            ClassLoader::addDirectories(array(public_path() . "/addons/{$addon->addon_name}/controllers", public_path() . "/addons/{$addon->addon_name}/models", public_path() . "/addons/{$addon->addon_name}/helpers"));
        }
    }
    foreach ($themes as $theme) {
        if ($theme->installed == 1) {
            $themesInstalled[] = $theme->theme_name;
            if ($theme->active == 1) {
                Config::set('cms.theme', $theme->theme_name);
                //include the functions file
                include_once public_path() . "/layouts/frontend/{$theme->theme_name}/func.php";
            }
        } else {
            $themesNotInstalled[] = $theme->theme_name;
        }
    }
    $settings = Settings::whereRaw("autoload=1")->get();
<?php

ini_set('php_fileinfo', 1);
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/custom', app_path() . '/custom/PhoneValidationRule.php'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
Example #25
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories([app_path() . '/controllers', app_path() . '/database/seeds']);
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a rotating log file setup which creates a new file each day.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #26
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/libs', app_path() . '/third_party/captcha'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #27
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/controllers/admin', app_path() . '/controllers/www', app_path() . '/library/function', app_path() . '/library/oss', app_path() . '/library/WxPayH/lib'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
Example #28
0
            throw new Exception("'{$Extension}' load failed!");
        }
    }
});
Event::listen('APL.core.prepare', function () use($APLExtensions) {
    foreach ($APLExtensions as $Extension) {
        $full_class = "WebAPL\\" . $Extension;
        $full_class::__init();
        class_alias($full_class, $Extension);
    }
});
Event::listen('APL.modules.load', function () {
    Event::fire('APL.core.load');
    Event::fire('APL.core.prepare');
    Module::where('enabled', '1')->get()->each(function ($module) {
        ClassLoader::addDirectories(app_path() . '/modules/' . $module->extension . '/');
        ClassLoader::load($module->extension);
        Modules::addInstance($module->extension);
    });
});
$clear_cache = FALSE;
Event::listen(['eloquent.sav*', 'eloquent.upd*', 'eloquent.del*', 'eloquent.creat*'], function () use(&$clear_cache) {
    $clear_cache = TRUE;
});
App::shutdown(function () use(&$clear_cache) {
    if ($clear_cache) {
        File::deleteDirectory($_SERVER['DOCUMENT_ROOT'] . '/apps/frontend/storage/cache/');
        @unlink($_SERVER['DOCUMENT_ROOT'] . '/apps/frontend/storage/meta/services.json');
        Cache::flush();
    }
});
Example #29
0
<?php

// 加载HBC公共配置文件
require_once '/data/www/hbc_conf/GlobalConfig.class.php';
error_reporting(E_ALL ^ E_NOTICE);
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useDailyFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
Example #30
0
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/controllers/site', app_path() . '/models'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may