public function deleteCurrency($id) { $currency = Currencies::find($id); Currencies::destroy($id); if ($currency['default']) { Currencies::all()->first()->update(['default' => true]); } return \Redirect::action('Admin\\SettingsController@currencies'); }