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


PHP Factory::file方法代码示例

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


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

示例1: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $data = ['table' => $this->argument('table'), 'attachment' => $this->argument('attachment'), 'after' => $this->argument('after')];
     // Create filename
     $file = base_path("database/migrations/" . date('Y_m_d_His') . "_add_{$data['attachment']}_fields_to_{$data['table']}_table.php");
     // Save the new migration to disk using the MediaSort migration view.
     $migration = $this->view->file(realpath(__DIR__ . '/../../resources/views/migration.blade.php'), $data)->render();
     $this->file->put($file, $migration);
     // Print a created migration message to the console.
     $this->info("Created migration: {$file}");
 }
开发者ID:torann,项目名称:mediasort,代码行数:16,代码来源:FastenCommand.php

示例2: rendered

 /**
  * Renders the given template path, and returns the resultant HTTP response.
  * 
  * @param string $path - The path to the template to be rendered.
  * @param array  $data - The data to pass into the template.
  *
  * @return Response
  */
 public function rendered($path, array $data)
 {
     // Format path.
     $path = $this->container->get('settings')['templatePath'] . DIRECTORY_SEPARATOR . $path;
     $path = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $path);
     $path .= '.blade.php';
     $response = $this->container['response'];
     /* @var Response $response */
     $response->getBody()->write($this->factory->file($path, $data)->render());
     return $response;
 }
开发者ID:garbetjie,项目名称:tiny,代码行数:19,代码来源:TemplateRenderer.php

示例3: file

 /**
  * Get the evaluated view contents for the given view.
  *
  * @param string $path
  * @param array $data
  * @param array $mergeData
  * @return \Illuminate\View\View 
  * @static 
  */
 public static function file($path, $data = array(), $mergeData = array())
 {
     return \Illuminate\View\Factory::file($path, $data, $mergeData);
 }
开发者ID:satriashp,项目名称:tour,代码行数:13,代码来源:_ide_helper.php

示例4: buildContent

 protected function buildContent()
 {
     $view = $this->view->file(__DIR__ . '/../../../views/content.blade.php');
     $view->content = $this->content;
     return $view;
 }
开发者ID:skywalker512,项目名称:FlarumChina,代码行数:6,代码来源:WebAppView.php


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