72 - Extracting a Finder Method

This commit is contained in:
Adam Wathan
2017-02-10 18:53:09 -05:00
parent 8ac3ab3441
commit 27fa6d98e2
3 changed files with 31 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ class OrdersController extends Controller
{
public function show($confirmationNumber)
{
$order = Order::where('confirmation_number', $confirmationNumber)->first();
$order = Order::findByConfirmationNumber($confirmationNumber);
return view('orders.show', ['order' => $order]);
}
}