app/Console/Commands/ExportToCsv.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle()
    {
        $model = $this->argument('report');
        $this->info('Start Exporting > '.$model);
        ini_set('memory_limit', '2048M');
        $ExportHelper = new AdminListExporter($model);
        $ExportHelper->setExtension('csv')->storeData();
        $memory = number_format(memory_get_peak_usage(true) / 1048576, 2) . ' MB';
        $this->info($memory);
        $this->info('File created'.$ExportHelper->fileStorage());
    }
public function handle ( ) { $ model = $ this -> argument ( 'report' ) ; $ this -> info ( 'Start Exporting > ' . $ model ) ; ini_set ( 'memory_limit' , '2048M' ) ; $ ExportHelper = new AdminListExporter ( $ model ) ; $ ExportHelper -> setExtension ( 'csv' ) -> storeData ( ) ; $ memory = number_format ( memory_get_peak_usage ( true ) / 1048576 , 2 ) . ' MB' ; $ this -> info ( $ memory ) ; $ this -> info ( 'File created' . $ ExportHelper -> fileStorage ( ) ) ; }
Execute the console command.
Execute the console command .