@foreach($lastactivity as $activity)
{{ $activity }}
@endforeach
這就是for循環。如何將foreach循環中的所有數據包含在表中
現在這是視圖中的輸出。
{"id":2,"log_name":"index-log","description":"I visited index","subject_id":null,"subject_type":null,"causer_id":1,"causer_type":"App\\User","properties":[],"created_at":"2017-07-18 11:05:08","updated_at":"2017-07-18 11:05:08"}
我怎樣才能把它放在所有的列和數據安排表?非常感謝你。
你應該只寫[表HTML(https://www.w3schools.com/html/html_tables.asp)並用您的值替換「td」的內容。行是'foreach'循環的內容 –