Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Console\Commands;
- use Mail;
- use Illuminate\Console\Command;
- use Maatwebsite\Excel\Facades\Excel;
- class DailyWebshopUpdate extends Command
- {
- protected $signature = 'email:webshoplist';
- protected $description = 'This is a test.';
- public function __construct()
- {
- parent::__construct();
- }
- public function handle()
- {
- error_log('FIRED');
- $csv = \Excel::download(new \App\Exports\ExportWebshopAll, 'klantenlijst.csv')
- Mail::send('emails.dailyupdate', [], function($message)
- {
- $message->to('remco.rol@bickery.nl')->subject('Test')->attach($csv->store("csv", false, true)['full']);
- });
- $this->info('Test has fired.');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement