Artisan::call doesn't work

Posted 11 months ago by marcosdipaolo

I have in my web route file:

Route::get('/algolia/import/posts', function(){
    $exitCode = Artisan::call('scout:import', [
        'model' =>'App\Post'
    return redirect('/');

and it doesn't work, my intention is being able to import my records to algolia's search index from a route.

Please sign in or create an account to participate in this conversation.