本文整理汇总了PHP中View::addNamespace方法的典型用法代码示例。如果您正苦于以下问题:PHP View::addNamespace方法的具体用法?PHP View::addNamespace怎么用?PHP View::addNamespace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View
的用法示例。
在下文中一共展示了View::addNamespace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
$this->moduleDirectory = $this->getModuleDirectory();
$this->generatorsDirectory = $this->getGeneratorsDirectory();
\View::addNamespace('pmgenviews', $this->generatorsDirectory);
}
示例2: boot
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->package('cednet/cms');
$this->workbenchPath = __DIR__ . '/../..';
include __DIR__ . '/../../routes_cms.php';
\View::addNamespace('cms', __DIR__ . '/../../views');
\Lang::addNamespace('cms', __DIR__ . '/../../lang');
}
示例3: __construct
public function __construct()
{
$this->now = date("Y/m/d H:i:s");
$this->ConfigFolder = realpath(__DIR__ . '/../../../config/banks/' . $this->drivername . '/');
$this->bankConfig = \Config::get('Payby::banks\\' . $this->drivername . '\\config.info');
\View::addLocation($this->ConfigFolder);
\View::addNamespace('Payby', $this->ConfigFolder);
}
示例4: boot
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
\View::addNamespace('voltcms/pages', __DIR__ . '/../../views');
$this->package('voltcms/pages');
CMS::addMenuItem('Pages', 'dashboard/pages');
CMS::addJSFile('packages/voltcms/pages/js/custom.js');
CMS::addJSFile('packages/voltcms/pages/js/app.js');
}
示例5: registerViewNamespace
protected function registerViewNamespace()
{
$childClass = get_class($this);
$exploded = explode('\\', $childClass);
$className = array_pop($exploded);
$path = __DIR__ . '/../fields/' . str_replace('_', '-', snake_case($className));
\View::addNamespace($childClass, $path);
}
示例6: boot
public function boot()
{
View::addNamespace('mailer', __DIR__ . '/../src/Components/views/mailer');
View::addNamespace('cmd', app_path() . '/commands/views');
View::addNamespace('socials', app_path('/src/Components/views/socials'));
View::addNamespace('flash', app_path('src/Components/views/flashes'));
View::addExtension('html', 'php');
Validation::extend();
}
示例7: boot
/**
* Register the service provider.
*
* @return void
*/
public function boot()
{
\View::addNamespace('voltcms/backup', __DIR__ . '/../../views');
$this->package('voltcms/backup');
$this->registerBackupCommand();
$this->app->bind('Voltcms\\Backup\\uploader\\uploaderInterface', 'Voltcms\\Backup\\uploader\\GlacierUploader');
$this->app->bind('aws', 'Voltcms\\Backup\\uploader\\implementations\\AWSUploader');
$this->app->bind('dropbox', 'Voltcms\\Backup\\uploader\\implementations\\DropboxUploader');
}
示例8: boot
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->package('yaro/jarboe');
include __DIR__ . '/../../helpers.php';
include __DIR__ . '/../../filters.php';
include __DIR__ . '/../../routes.php';
include __DIR__ . '/../../view_composers.php';
\View::addNamespace('admin', __DIR__ . '/../../views/');
}
示例9: boot
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->package('jeroen-g/laravel-photo-gallery', 'gallery');
// Views will first be sought in app/views/gallery before the package view is used.
\View::addNamespace('gallery', app_path() . '/views/gallery');
\View::addNamespace('gallery', __DIR__ . '/../../views');
// Shortcut for using the gallery language lines.
\Lang::addNamespace('gallery', __DIR__ . '/../../lang');
include __DIR__ . '/../../routes.php';
}
示例10: boot
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
\View::addNamespace('voltcms/voltcms', __DIR__ . '/../../views');
$this->package('voltcms/voltcms');
$this->registerInstalationCommand();
CMS::addCSSFile('packages/voltcms/voltcms/css/reset.css');
CMS::addCSSFile('packages/voltcms/voltcms/css/style.css');
CMS::addCSSFile('packages/voltcms/voltcms/redactor/redactor.css');
CMS::addJSFile('packages/voltcms/voltcms/redactor/redactor.min.js');
CMS::addJSFile('packages/voltcms/voltcms/js/retina.min.js');
}
示例11: boot
/**
* Bootstrap the application events.
*/
public function boot()
{
$configPath = base_path('vendor/rtconner/laravel-addresses/src/config/config.php');
$viewsPath = base_path('vendor/rtconner/laravel-addresses/src/views');
$migrationsPath = base_path('vendor/rtconner/laravel-addresses/src/migrations');
$seedsPath = base_path('vendor/rtconner/laravel-addresses/src/migrations/seeds');
$this->publishes([$migrationsPath => database_path() . '/migrations']);
$this->publishes([$seedsPath => database_path() . '/seeds']);
$this->publishes([$configPath => config_path('addresses.php')], 'config');
\View::addNamespace('addresses', $viewsPath);
$this->loadViewsFrom($viewsPath, 'Addresses');
}
示例12: create
/**
* Creating new services, namespaces and others.
*
* @return void
*/
protected function create($module)
{
$path = $this->path;
\View::addNamespace($module, $path . $module . '/views');
\Config::addNamespace($module, $path . $module . '/config');
// create aliases for controllers and models
$use_alias = \Config::get($module . '::app.alias');
if ($use_alias == TRUE) {
$this->createAliases($module);
}
$modulePath = $path . $module;
\ClassLoader::addDirectories(array($modulePath . '/commands', $modulePath . '/controllers', $modulePath . '/models', $modulePath . '/database/seeds'));
}
示例13: boot
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->package('vis/builder');
include __DIR__ . '/../../helpers.php';
include __DIR__ . '/../../filters.php';
include __DIR__ . '/../../routes.php';
include __DIR__ . '/../../view_composers.php';
include __DIR__ . '/../../events/settings.php';
include __DIR__ . '/../../events/users.php';
include __DIR__ . '/../../events/translate.php';
include __DIR__ . '/../../events/table.php';
$this->app['config']->package('builder', app_path() . '/config/packages/vis/builder/', "builder");
\View::addNamespace('admin', __DIR__ . '/../../views/');
}
示例14: boot
/**
* {@inheritDoc}
*/
public function boot()
{
$this->package('payum/payum-laravel-package');
\View::addNamespace('payum/payum', __DIR__ . '/../../views');
$this->app->error(function (ReplyInterface $reply) {
$response = null;
if ($reply instanceof SymfonyHttpResponse) {
$response = $reply->getResponse();
} elseif ($reply instanceof HttpResponse) {
$response = new Response($reply->getContent());
} elseif ($reply instanceof HttpRedirect) {
$response = new RedirectResponse($reply->getUrl());
}
if ($response) {
return $response;
}
$ro = new \ReflectionObject($reply);
throw new LogicException(sprintf('Cannot convert reply %s to Laravel response.', $ro->getShortName()), null, $reply);
});
\Route::any('/payment/authorize/{payum_token}', array('as' => 'payum_authorize_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\AuthorizeController@doAction'));
\Route::any('/payment/capture/{payum_token}', array('as' => 'payum_capture_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\CaptureController@doAction'));
\Route::any('/payment/refund/{payum_token}', array('as' => 'payum_refund_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\RefundController@doAction'));
\Route::get('/payment/notify/{payum_token}', array('as' => 'payum_notify_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\NotifyController@doAction'));
\Route::get('/payment/notify/unsafe/{payment_name}', array('as' => 'payum_notify_do_unsafe', 'uses' => 'Payum\\LaravelPackage\\Controller\\NotifyController@doUnsafeAction'));
$this->app['payum'] = $this->app->share(function ($app) {
//TODO add exceptions if invalid payments and storages options set.
$payum = new ContainerAwareRegistry(\Config::get('payum-laravel-package::payments'), \Config::get('payum-laravel-package::storages'));
$payum->setContainer($app);
return $payum;
});
$this->app['payum.security.token_storage'] = $this->app->share(function ($app) {
//TODO add exceptions if invalid payments and storages options set.
$tokenStorage = \Config::get('payum-laravel-package::token_storage');
return is_object($tokenStorage) ? $tokenStorage : $app[$tokenStorage];
});
$this->app['payum.security.token_factory'] = $this->app->share(function ($app) {
return new TokenFactory($app['payum.security.token_storage'], $app['payum'], 'payum_capture_do', 'payum_notify_do', 'payum_authorize_do', 'payum_refund_do');
});
$this->app['payum.security.http_request_verifier'] = $this->app->share(function ($app) {
return new HttpRequestVerifier($app['payum.security.token_storage']);
});
}
示例15: register
public function register()
{
//
\View::addNamespace('BW', __DIR__ . '/../../views');
//
$this->app->register('BW\\Providers\\FlashServiceProvider');
$this->app->register('BW\\Providers\\CommandServiceProvider');
$this->app->register('BW\\Providers\\ComposerServiceProvider');
// Register facade
$this->app->bind('bw.admin', function ($app) {
return new \BW\BWAdmin();
});
// Register alias
$loader = \Illuminate\Foundation\AliasLoader::getInstance();
$loader->alias('BWAdmin', 'BW\\Support\\Facades\\BWFacade');
//
\App::bind('Illuminate\\Routing\\ResourceRegistrar', function () {
return \App::make('BW\\Providers\\ResourceNoPrefixRegistrar');
});
}