URL에 전달 된 ID를 가져오고 싶지만 문제가있는 것 같습니다.변수를 URL에 전달했습니다. Laravel 4
이 내 routes.php
Route::get('/poste/{idp}',array('before' => 'members_auth',function($id){
//dd($id);
$post =Posts::where('idp','=',$id) -> get();
$titre=$post->titre;
$desc=$post->description;
return View::make('showPost',array('title'=>$titre,'description'=>$desc));
}));
입니다 그리고 이것은 내보기
<a href="/poste/{{$userpost->idp}}">
오류가 Undefined property: Illuminate\Database\Eloquent\Collection::$titre
예 idp는 기본 키이지만 시도한 때 $ post = Posts :: find ($ id); 보기 :: make ('showPost') -> with ('idpost', $ post-> idp); 열을 찾을 수 없음 : 1054 'where 절'에서 알 수없는 'id'열 (SQL : select * from'posts' from 'id' = 25 – user3475960