Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 0042dfa

Browse files
committed
Added user method for more scope flexibility
1 parent 16c1afa commit 0042dfa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Commands/UserImportScope.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ public function __construct($guid, $username)
4444
* @return void
4545
*/
4646
public function apply(Builder $query, Model $model)
47+
{
48+
$this->user($query);
49+
}
50+
51+
/**
52+
* Applies the user scope to the given Eloquent query builder.
53+
*
54+
* @param Builder $query
55+
*/
56+
protected function user(Builder $query)
4757
{
4858
// We'll try to locate the user by their object guid,
4959
// otherwise we'll locate them by their username.

0 commit comments

Comments
 (0)