LoginSignup
0
0

More than 3 years have passed since last update.

bladeでDBを扱う

Posted at

bladeでDBに保存されているデータを呼び出したい

今回はUniversityと言うテーブルに保存されているlogo_urlというカラムをとってきたいと言う内容です。

blade.php
<img src="{{\App\Models\University::first()->logo_url}}" alt="logo">

上記のようにModelを使って取得できます。

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