I want to get the ID which was passed in the URL but it seems something goes wrong!
This is my 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));
}));
And this is my View
<a href="/poste/{{$userpost->idp}}">
The error was Undefined property: Illuminate\Database\Eloquent\Collection::$titre