Upload beautify
This commit is contained in:
18
app/Repositories/Uploads/ArtworkFileRepository.php
Normal file
18
app/Repositories/Uploads/ArtworkFileRepository.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repositories\Uploads;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
final class ArtworkFileRepository
|
||||
{
|
||||
public function upsert(int $artworkId, string $variant, string $path, string $mime, int $size): void
|
||||
{
|
||||
DB::table('artwork_files')->updateOrInsert(
|
||||
['artwork_id' => $artworkId, 'variant' => $variant],
|
||||
['path' => $path, 'mime' => $mime, 'size' => $size]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user