LoginSignup
0
0

More than 1 year has passed since last update.

blade.php内の変数の中身を知りたい

Last updated at Posted at 2023-02-24

blade.php内の変数の中身を知りたいとき、LaravelにおいてControllerの中であれば
dd関数に変数を入れ込めばよかったが、blade.phpの中ではエラーが出てしまう。

理由

PHPコードをHTML内に記述するには、PHPコードを記述する箇所を<? php ?>で囲む必要があるため。

解決方法

<?php dd($a) ?>

単純にphpタグで囲むだけでした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0