Skip to content

Instantly share code, notes, and snippets.

@andrewhl
Created June 12, 2014 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewhl/dc4f02968a46bdf7970b to your computer and use it in GitHub Desktop.
Save andrewhl/dc4f02968a46bdf7970b to your computer and use it in GitHub Desktop.
/**
* Display the specified resource.
* GET /food_items/{id}
*
* @param int $id
* @return Response
*/
public function show($id)
{
if ($food_item = $this->foodItem->find($id))
{
return View::make('food_items.show', compact('food_item'));
} else
{
Flash::error('Food Item not found');
Redirect::to('food_items.index');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment