remove finally block

This commit is contained in:
printempw 2016-07-28 11:50:35 +08:00
parent e3dccf23d6
commit 68d5062941

View File

@ -7,8 +7,6 @@ use App\Exceptions\E;
class Option
{
public $timestamps = false;
public static function get($key) {
$option = OptionModel::where('option_name', $key)->first();
if (!$option) throw new E('Unexistent option.', 1);
@ -34,9 +32,8 @@ class Option
OptionModel::where('option_name', $key)->firstOrFail();
} catch (Illuminate\Database\Eloquent\ModelNotFoundException $e) {
return false;
} finally {
return true;
}
return true;
}
public static function delete($key) {