I have LDAPRecord set up and running as needed to import user account information (not for authentication). I want to schedule the import but can't get the code correct. I am running Laravel 11 and Filament. Below is the code that I have set as an action for a button, which works fine. I tried using this in console.php but it failed. I have also tried different iterations and either get a failure or it doesn't import.
Artisan::call('ldap:import', [
'provider' => 'domainusers',
'--no-interaction',
'--restore' => true,
'--delete' => true,
'--delete-missing' => true,
'--filter' => '(objectclass=user)'
]);