public function updateAmont($txid, $amount) { try { $transaction = Transactions::firstOrFail($txid); //first yeah } catch (ModelNotFoundException $e) { return false; } $transaction->amount = $amount; $transaction->save(); return true; }
public function updateAmont($txid, $amount) { try { $transaction = Transactions::firstOrFail($txid); //first yeah } catch (ModelNotFoundException $e) { return false; } $transaction->amount = $amount; $transaction->save(); return true; }