X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FChannel.php;h=8045a4194fa529561ba6a091c0aa7770beb18dce;hb=907f392f8d2fbadb3f53a277cc90ae080da6d476;hp=46155cda710d1c5d0de970a692d84a8fce889924;hpb=ebdf8e5f6761de2abd85b01096a67dee62d7d4aa;p=alttp.git diff --git a/app/Models/Channel.php b/app/Models/Channel.php index 46155cd..8045a41 100644 --- a/app/Models/Channel.php +++ b/app/Models/Channel.php @@ -32,6 +32,11 @@ class Channel extends Model { } public function randomOfClass($class) { + if (is_array($class)) { + return $this->queryChatlog() + ->whereIn('classification', $class) + ->first(); + } return $this->queryChatlog() ->where('classification', '=', $class) ->first(); @@ -240,6 +245,10 @@ class Channel extends Model { return Arr::join($entries, ', ', ' and '); } + public function chat_bot_logs() { + return $this->hasMany(ChatBotLog::class); + } + public function crews() { return $this->hasMany(ChannelCrew::class); }