How can I solve “Fatal error: Out of memory…” when I run command schedule laravel?
问题 My command like this : <?php namespace App\Console\Commands; use Illuminate\Console\Command; use App\Models\ItemDetail; class ImportItemDetail extends Command { protected $signature = 'sync:item-detail'; protected $description = 'sync item detail'; public function __construct() { parent::__construct(); ini_set('max_execution_time', 0); ini_set('memory_limit', '-1'); } public function handle() { $path = storage_path('json/ItemDetail.json'); $json = json_decode(file_get_contents($path), true);