update controllers logic
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Resources\ClassProgress;
|
||||
|
||||
use App\Services\ApplicationUrlService;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
@@ -15,7 +16,7 @@ class ClassProgressAttachmentResource extends JsonResource
|
||||
'id' => $id ? (int) $id : null,
|
||||
'name' => $this['name'] ?? $this->original_name ?? null,
|
||||
'file_path' => $this['file_path'] ?? $this->file_path ?? null,
|
||||
'download_url' => $id ? url("/api/v1/class-progress/attachments/{$id}") : null,
|
||||
'download_url' => $id ? app(ApplicationUrlService::class)->forClassProgressAttachment($id) : null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user