lundi 1 juin 2020

How to run Artisan command without a console

Someone know how to start command without console

Let me explain After the file is downloaded successfully, you need to run the command php artisan db:seed I tried this option but I got an error as a result Maybe someone knows another solution to this problem I will be very grateful I tried this option but I got an error as a result

$file = file($request->file->getRealPath());
$fileName = resource_path('upload/csv/accounts/' . date('y-m-d-H-i-s') . '.csv');
$path = file_put_contents($fileName, $file);
return redirect()->route('admin.accounts');

I tried this option

$file = file($request->file->getRealPath());
$fileName = resource_path('upload/csv/accounts/' . date('y-m-d-H-i-s') . '.csv');
$path = file_put_contents($fileName, $file);
return redirect()->route('admin.accounts');
Artisan::call('db:seed');

And this

$file = file($request->file->getRealPath());
$fileName = resource_path('upload/csv/accounts/' . date('y-m-d-H-i-s') . '.csv');
$path = file_put_contents($fileName, $file);
return redirect()->route('admin.accounts')->with(Artisan::call('db:seed'));


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3cvBKPL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire