/** * Validate Reset link * * @return Response */ public function reset($link = '') { $errors = new MessageBag(); //1. Check Link $customer_data = \App\Models\Customer::resetpasswordlink($link)->notSSOMedia(['facebook'])->first(); if (!$customer_data) { $errors->add('Customer', 'Link tidak valid.'); } if ($errors->count()) { return new JSend('error', (array) Input::all(), $errors); } return new JSend('success', (array) $customer_data->toArray()); }