mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-28 06:20:42 -05:00
refactor: prefer ::query() over laravel eloquent magic
Significantly improves DX with LSP compatibility. Now it's possible to navigate to the definition of these functions in laravel and get ide autocomplete.
This commit is contained in:
@@ -43,11 +43,11 @@ class ProcessMassPM implements ShouldQueue
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
$conversation = Conversation::create(['subject' => $this->subject]);
|
||||
$conversation = Conversation::query()->create(['subject' => $this->subject]);
|
||||
|
||||
$conversation->users()->sync([$this->senderId => ['read' => true], $this->receiverId]);
|
||||
|
||||
PrivateMessage::create([
|
||||
PrivateMessage::query()->create([
|
||||
'conversation_id' => $conversation->id,
|
||||
'sender_id' => $this->senderId,
|
||||
'message' => $this->message
|
||||
|
||||
Reference in New Issue
Block a user