file = $file; $this->directory = $directory; } public function handle() : ?string { //make dir Storage::makeDirectory('public/' . $this->directory, 0755); //upload file $path = Storage::putFile('public/' . $this->directory, $this->file); $url = Storage::url($path); //return file path if($url) return $url; else return null; } }