return view in route Laravel with URL parameters

In route file

Route::get('feed/{id}',function($id){
    return view('app/feed',['id' => $id]);
});

In blade file

<?php
echo $id;
?>

Leave a Reply