Exemplo n.º 1
0
 public function testParametersMake()
 {
     $result = Blade::make("view2", ["title" => "Test Title"])->render();
     $this->assertSame(file_get_contents(__DIR__ . "/views/view2.html"), $result);
 }
Exemplo n.º 2
0
 /**
  * Add content to the body of the message.
  *
  * @param string $view The name of the view to use
  * @param array $params Parameters to pass to the view
  *
  * @return static
  */
 public function addView($view, array $params = null)
 {
     if (!is_array($params)) {
         $params = [];
     }
     $content = Blade::make($view, $params);
     return $this->addContent($content);
 }