Created
December 4, 2018 14:49
-
-
Save avosalmon/e9d4c10a2c439359e7095bf6faf68633 to your computer and use it in GitHub Desktop.
ProductController after refactoring
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ProductController extends Controller | |
{ | |
public function show($id) | |
{ | |
$product = $this->products->findOrFail($id); | |
return ProductResponse($product); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment