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


PHP Application::publicPath方法代码示例

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


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

示例1: compileScriptMaterial

 /**
  * @return \Illuminate\Support\Collection
  */
 protected function compileScriptMaterial()
 {
     $files = new Collection();
     $this->layoutJsMaterial->merge($this->defaultJsMaterial)->merge($this->extendJsMaterial)->each(function ($value) use($files) {
         $files->push($this->findPath($value));
     });
     $code = md5($files);
     $this->dispatcher->listen('kernel.handled', function () use($code, $files) {
         $dictionary = new Collection();
         $dictionary->push($this->application->publicPath());
         $dictionary->push('cache');
         $dictionary = $this->pathSplit($code, '2,2,2,2,2,2', $dictionary);
         $dictionary = $dictionary->implode(DIRECTORY_SEPARATOR);
         if (!$this->files->isDirectory($dictionary)) {
             $this->files->makeDirectory($dictionary, 0755, true, true);
         }
         $file = $dictionary . DIRECTORY_SEPARATOR . Str::substr($code, 12, 20) . '.js';
         $key = 'cache.script.' . $code;
         if (!$this->files->exists($file) || !$this->cache->has($key) && $this->application->inDebugMode()) {
             $content = $this->compileScript($files);
             $expires = Carbon::now()->addMinutes(10);
             $this->cache->put($key, $content, $expires);
             file_put_contents($file, $content);
         }
     });
     return $this->pathSplit($code, '2,2,2,2,2,2,20', Collection::make(['cache']))->implode('/') . '.js';
 }
开发者ID:darrengopower,项目名称:framework,代码行数:30,代码来源:Material.php

示例2: bootstrap

 public function bootstrap(Application $app)
 {
     $this->app = $app;
     $this->fs = new Filesystem();
     $paths = [$app->exportPath(), $app->homePath(), $app->storagePath(), $app->databasePath(), $app->publicPath(), $app->configPath()];
     foreach ($paths as $path) {
         $this->ensureDirectory($path);
     }
     $storagePaths = ['app', 'framework', 'framework/cache', 'framework/views', 'framework/sessions', 'logs', $app->getSlug()];
     foreach ($storagePaths as $path) {
         $this->ensureDirectory(path_join($app->storagePath(), $path));
     }
 }
开发者ID:laradic-old,项目名称:illuminate,代码行数:13,代码来源:EnsureDirectories.php

示例3: publishAssets

 protected function publishAssets()
 {
     $this->filesystem->copyDirectory($this->application->basePath() . '/vendor/components/font-awesome/fonts', $this->application->publicPath() . '/assets/fonts');
 }
开发者ID:Luceos,项目名称:core,代码行数:4,代码来源:InstallCommand.php


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