strlen($value) > 2 ? Profile::whereNotNull('domain')->where('username', 'like', $value.'%')->pluck('username', 'id')->all() : [] ); $profile = Profile::whereNotNull('domain')->find($id); if (! $profile) { $this->error('Could not find profile.'); exit; } $confirmed = confirm('Are you sure you want to delete '.$profile->username.'\'s account? This action cannot be reversed.'); DeleteRemoteProfilePipeline::dispatch($profile)->onQueue('adelete'); $this->info('Dispatched delete job, it may take a few minutes...'); exit; } }