Skip to content

Commit

Permalink
use int for order column
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Jan 12, 2024
1 parent 076beb2 commit 3fc41d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion database/migrations/create_media_table.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ return new class extends Migration
$table->string('disk')->nullable();
$table->unsignedBigInteger('size')->nullable();
$table->json('generated_conversions')->nullable();
$table->string('order')->nullable()->index();
$table->unsignedBigInteger('order')->nullable()->index();

$table->string('path')->nullable();
$table->string('type')->nullable();
Expand Down
4 changes: 2 additions & 2 deletions src/Models/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* @property ?int $height
* @property ?float $aspect_ratio
* @property ?string $average_color
* @property ?string $order
* @property ?int $order
* @property ?Collection<string, GeneratedConversion> $generated_conversions
* @property ?ArrayObject $metadata
* @property ?Model $model
Expand Down Expand Up @@ -467,7 +467,7 @@ public function getSrcset(?string $conversion = null): Collection
}

/**
* @param null|(Closure(null|string $previous): string) $sequence
* @param null|(Closure(null|int $previous): int) $sequence
* @return EloquentCollection<int, static>
*/
public static function reorder(array $keys, ?Closure $sequence = null, string $using = 'id'): EloquentCollection
Expand Down

0 comments on commit 3fc41d9

Please sign in to comment.