解決したいこと
エラー画面の原因をつきとめたい
エディタの方でのエラーは、この名前はすでに使われているというエラーがでてきます。
htmlのほうでは、
"Call to undefined method Symfony\Component\Routing\Annotation\Route::get()"
というエラーが画面がでている状況です。
エディタのエラーででている部分をコメントアウトしても、エラー画面の文面はかわらない状況です。
php
1HelloController.php 2 3 public function show(Request $request) 4 { 5 $id = $request->id; 6 $item = DB::table('people')->where('id',$id)->first(); 7 return view('hello.show',['item' => $item]); 8 } 9}
php
1web.php 2 3//クエリビルダ show() 4Route::get('hello/show', 'HelloController@show');
php
1 2show.blade.php 3 4@extends('layouts.helloapp') 5 6@section('title' ,'Show') 7 8@section('menubar') 9 @parent 10 詳細ページ 11@endsection 12 13@section('content') 14 <table> 15 <form action="/hello/edit" method="POST"> 16 <tr> 17 <th>id:</th> 18 <td><{{$item->id}}></td> 19 </tr> 20 <tr> 21 <th>name:</th> 22 <td><{{$item->name}}></td> 23 </tr> 24 <tr> 25 <th>mail:</th> 26 <td><{{$item->mail}}></td> 27 </tr> 28 <tr> 29 <th>age:</th> 30 <td><{{$item->age}}></td> 31 </tr> 32 </table> 33@endsection
いじったものは、これぐらいです
追記
いま、前まで表示できていた画面まで、戻しましたが。エラー画面が止まらない状況です。
どうすれば直るのか本当にわからないです。
回答1件
あなたの回答
tips
プレビュー