public static function view($key) { $body = static::where('name', $key)->pluck('body'); if ($body === null) { $row = new static(); $row->name = $key; $row->title = ''; $row->forceSave(); } return $body; }
/** * Create a record without attempting to validate it * * @param array $data * @return Vocal */ public static function forceCreate(array $data = []) { $model = new static(); $model->forceSave($data, true); return $model; }