/** * Set the account free (free tier) * * @return boolean True if successful, false if it fails */ public static function be_free_my_brother() { // Get the cached row $account_data = static::get_account(); // No data if (empty($account_data)) { return false; } // Pull the row so that we have an object to use for Orm manipulation. $account_row = static::find($account_data['id']); $account_row->free_account_on = 0; $account_row->access_level = 1; $account_row->max_calls = \Config::get('tiers.free.max_calls', 10000); $saved = $account_row->save(); \V1\Usage::delete_usage(); return $saved; }