get item by sku in api

This commit is contained in:
denisdulici
2017-10-08 23:25:44 +03:00
parent 1a53c60082
commit 033674666f
4 changed files with 12 additions and 5 deletions

View File

@ -34,7 +34,7 @@ class Customers extends ApiController
{
// Check if we're querying by id or email
if (is_numeric($id)) {
$customer = Customer::findOrFail($id);
$customer = Customer::find($id);
} else {
$customer = Customer::where('email', $id)->first();
}