Skip to content
Snippets Groups Projects
Verified Commit eb2e1560 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

feat: change join strategy in ProcessUserAgentsCommand to leftJoin for better...

feat: change join strategy in ProcessUserAgentsCommand to leftJoin for better handling of user agents

- Updated the join method from `join` to `leftJoin` in the `handle` method.
- Changed the condition in the `whereNull` clause to check for `user_agent_metadata.id` instead of `is_bot`.
parent 6a5ae614
Branches
No related tags found
1 merge request!59Ajouter service ia & détection bots user agents
Pipeline #1034 passed
......@@ -14,8 +14,8 @@ class ProcessUserAgentsCommand extends Command
public function handle(): void
{
$userAgents = UserAgent::join('user_agent_metadata', 'user_agents.id', '=', 'user_agent_metadata.user_agent_id')
->whereNull('user_agent_metadata.is_bot')
$userAgents = UserAgent::leftJoin('user_agent_metadata', 'user_agents.id', '=', 'user_agent_metadata.user_agent_id')
->whereNull('user_agent_metadata.id')
->select('user_agents.id', 'user_agents.user_agent')
->get();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment