```php public function show($id) { $exam = Exam::find($id); return view('exam.show', compact('exam')); } ``` ``` 7. `find() `是 Eloquent 根據主鍵用來取出該筆資料用的。詳情請看: 8. 最後,只要製作好樣板,讓資料顯示出來即可,請建立 `/專案/resources/views/exam/show.blade.php`: ```php @extends('layouts.app') @section('content') {{$exam->title}} 發佈於 {{$exam->created_at->format("Y年m月d日 H:i:s")}} / 最後更新: {{$exam->updated_at->format("Y年m月d日 H:i:s")}} @endsection ``` [](https://github.com/tad0616/exam56/commit/5383964e52906554bbc18a77f9ae79d604c6810c)
進階搜尋