私が見つけた最良の方法は、ベースコントローラでView :: addExtensionを使うことです。
は、ここに私のコードサンプルです:
ビュー:: addExtension( 'blade.html'、 'ブレード');
class BaseController extends Controller {
/**
* Setup the layout used by the controller.
*
* @return void
*/
protected function setupLayout()
{
// Allows us to use easy-to-edit html extension files.
// You can set 2nd param to 'php' is you want to
// just process with php (no blade tags)
View::addExtension('blade.html','blade');
if (! is_null($this->layout))
{
$this->layout = View::make($this->layout);
}
}
}
私は解決策を見つけたと思いますが、もう1つのロードブロッキングに行きました(これは別の日です)。 解決策はView :: addExtension( 'html'、 'php') です。これにより、laravelはhtmlファイルを読み込んでphpで実行します。 – Mcg1978
@ Mcg1978 'View :: addExtension( 'html'、 'php')はどこに追加すればいいですか –