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

Commit fe1ddb2

Browse files
committed
Updated import command docs
1 parent e948cc0 commit fe1ddb2

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

docs/importing.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,28 @@ php artisan adldap:import --no-interaction
110110

111111
Users will be imported automatically with no prompts.
112112

113-
If you are calling the import command from another command, or the Laravel
114-
scheduler, make sure you supply a `true` value to the flag, if
115-
you are using multiple flags / parameters:
113+
You can also call the command from the Laravel Scheduler, or other commands:
116114

117115
```php
118-
$schedule->command('adldap:import', [
119-
'--filter' => '(cn=johndoe)',
120-
'--no-interaction' => true,
121-
])->hourly();
116+
// Importing one user
117+
$schedule->command('adldap:import sbauman', ['--no-interaction'])
118+
->everyMinute();
119+
```
120+
121+
```php
122+
// Importing all users
123+
$schedule->command('adldap:import', ['--no-interaction'])
124+
->everyMinute();
125+
```
126+
127+
```php
128+
// Importing users with a filter
129+
$dn = 'CN=Accounting,OU=SecurityGroups,DC=Acme,DC=Org';
130+
131+
$filter = sprintf('(memberof:1.2.840.113556.1.4.1941:=%s)', $dn);
132+
133+
$schedule->command('adldap:import', ['--no-interaction', '--filter' => $filter])
134+
->everyMinute();
122135
```
123136

124137
## Tips

0 commit comments

Comments
 (0)