X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FChannel.php;h=8af6a7d43e201e191651a4ab9b28fc7c11642ec5;hb=17d105b4d07ce544e94b7f90ff7f50feb86b244f;hp=5c7ae70c0e95ebfec714052becfc28580dc1f354;hpb=1d3c8c6a96fc45d839f0e3719baca790059d189f;p=alttp.git diff --git a/app/Models/Channel.php b/app/Models/Channel.php index 5c7ae70..8af6a7d 100644 --- a/app/Models/Channel.php +++ b/app/Models/Channel.php @@ -32,10 +32,9 @@ class Channel extends Model { } public function randomOfClass($class) { - $line = $this->queryChatlog() + return $this->queryChatlog() ->where('classification', '=', $class) ->first(); - return $line ? $line->text_content : ''; } public function queryChatlog() { @@ -241,6 +240,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); }