當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。