return redirect('cats/' . $cat->id)->withSuccess('Cat has been created.'); }); // about Route::get('about', function () { return view('about')->with('number_of_cats', 9000); }); // inicio Route::get('/', function () { return redirect('cats'); }); //Route::get('/', function() { // return 'All cats bastard'; //}); // cats Route::get('cats/{id}', function ($id) { $cat = Furbook\Cat::find($id); //var_dump($cats); // echo '<pre>'; // echo print_r($cat, true); // echo '</pre>'; //return 'All cats bastard'; return view('cats.show')->with('cat', $cat); }); //Route::get('cats/{cat}', function(Furbook\Cat $cat) { // return view('cats.show')->with('cat', $cat); //}); Route::get('cats', function () { $cats = Furbook\Cat::all(); // echo '<pre>'; // var_dump($cats); // echo print_r($cats, true);