attachment_id; Log::info($url); //$response = Http::get($url); $data = [ 'uid' => $this->uid, 'sentence_id' => $this->sentence_id, 'attachment_id' => $this->attachment_id, 'attachment' => [], 'editor_id' => $this->editor_id, ]; $res = Attachment::find($this->attachment_id); $filename = $res->bucket . '/' . $res->name; if (App::environment('local')) { $data['attachment']['url'] = Storage::url($filename); } else { $data['attachment']['url'] = Storage::temporaryUrl($filename, now()->addDays(2)); } return $data; } }