argument('file'),'files/')) throw new \Exception('Filename must start with files/'); Job::dispatchSync( Site::findOrFail($this->argument('siteid')), Supplier::where('name',$this->argument('supplier'))->singleOrFail(), Carbon::create($this->argument('date')), $this->argument('file'), ); } }