refactor: swap where('id', '=', ) for find()

This commit is contained in:
Roardom
2023-06-19 07:27:06 +00:00
parent bded8dd3e6
commit b5493c5642
40 changed files with 52 additions and 56 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ class ChatController extends Controller
public function botMessages($botId): \Illuminate\Http\Resources\Json\AnonymousResourceCollection
{
$runbot = null;
$bot = Bot::where('id', '=', $botId)->firstOrFail();
$bot = Bot::findOrFail($botId);
if ($bot->is_systembot) {
$runbot = new SystemBot($this->chatRepository);
} elseif ($bot->is_nerdbot) {