diff --git a/src/Blockkit/Blocks.php b/src/Blockkit/Blocks.php index 41fc630..b6614b6 100644 --- a/src/Blockkit/Blocks.php +++ b/src/Blockkit/Blocks.php @@ -239,6 +239,16 @@ class Blocks extends BlockKit return $this->section(['text'=>$text]); } + /** + * Add a spacer line + * + * @return $this + */ + public function addSpacer(): self + { + return $this->section(['text'=>Text::item(' ')]); + } + /** * A context block * diff --git a/src/Models/Channel.php b/src/Models/Channel.php index 55db525..6459054 100644 --- a/src/Models/Channel.php +++ b/src/Models/Channel.php @@ -42,6 +42,11 @@ class Channel extends Model return Arr::get($this->attributes,'name') ?: $this->channel_id; } + public function getSlackUrlAttribute(): string + { + return sprintf('<#%s>',$this->channel_id); + } + /* METHODS */ /** diff --git a/src/Models/User.php b/src/Models/User.php index 2b75468..bb7bb0c 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -24,6 +24,16 @@ class User extends Model /* ATTRIBUTES */ + /** + * Is this user an admin + * + * @return bool + */ + public function getIsAdminAttribute(): bool + { + return $this->admin; + } + /** * Return the user in slack response format */