Skip to content

Commit 9a7fc0e

Browse files
authored
Merge pull request #38 from mintopia/develop
Laravel 11, Bugfixes and Improvements
2 parents b6f92c4 + 8f75adf commit 9a7fc0e

14 files changed

Lines changed: 1613 additions & 1449 deletions

File tree

app/Console/Commands/UpdateEventSeatingLock.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class UpdateEventSeatingLock extends Command
2828
*/
2929
public function handle()
3030
{
31-
Event::where('seating_opens_at', '<', Carbon::now())->chunk(100, function($chunk) {
31+
Event::where('seating_opens_at', '<=', Carbon::now())->chunk(100, function($chunk) {
3232
foreach ($chunk as $event) {
3333
$this->output->writeln("{$event} Unlocking seating");
3434
Log::info("{$event}: Unlocking seating");
@@ -37,11 +37,11 @@ public function handle()
3737
$event->save();
3838
}
3939
});
40-
Event::where('seating_closes_at', '<', Carbon::now())->chunk(100, function($chunk) {
40+
Event::where('seating_closes_at', '<=', Carbon::now())->chunk(100, function($chunk) {
4141
foreach ($chunk as $event) {
4242
$this->output->writeln("{$event} Locking seating");
4343
Log::info("{$event}: Locking seating");
44-
$event->seating_locked = false;
44+
$event->seating_locked = true;
4545
$event->seating_closes_at = null;
4646
$event->save();
4747
}

app/Http/Controllers/Admin/SeatingPlanController.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ protected function updateObject(SeatingPlan $plan, Request $request)
3535
{
3636
$plan->name = $request->input('name');
3737
$plan->image_url = $request->input('image_url');
38-
$imageSizeArr = getimagesize($request->input('image_url'));
39-
if($imageSizeArr) {
40-
$plan->image_height = $imageSizeArr[1];
41-
$plan->image_width = $imageSizeArr[0];
38+
$plan->image_height = null;
39+
$plan->image_width = null;
40+
if ($plan->image_url) {
41+
$imageSizeArr = getimagesize($request->input('image_url'));
42+
if ($imageSizeArr) {
43+
$plan->image_height = $imageSizeArr[1];
44+
$plan->image_width = $imageSizeArr[0];
45+
}
4246
}
4347
$plan->scale = $request->input('scale') ? $request->input('scale') : 100;
4448
$plan->save();

app/Models/SeatingPlan.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function import(string $csv, bool $wipe = false): void
173173
$seat->description = $row[6] ?? null;
174174
$seat->class = $row[7] ?? null;
175175
$seat->seat_group_id = (int)$row[8] ?? null;
176-
$seat->disabled = (bool)$row[8];
176+
$seat->disabled = (bool)$row[9];
177177

178178
$seat->saveQuietly();
179179
}

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"description": "LAN Party Signup and Seating Manager",
55
"license": "MIT",
66
"require": {
7-
"php": "^8.1",
7+
"php": "^8.2",
88
"aws/aws-sdk-php": "^3.293",
99
"guzzlehttp/guzzle": "^7.2",
10-
"laravel/framework": "^10.10",
10+
"laravel/framework": "^11.22",
1111
"laravel/prompts": "*",
1212
"laravel/pulse": "^1.0@beta",
13-
"laravel/sanctum": "^3.3",
13+
"laravel/sanctum": "^4.0",
1414
"laravel/socialite": "^5.11",
15-
"laravel/telescope": "^4.17",
15+
"laravel/telescope": "^5.0",
1616
"laravel/tinker": "^2.8",
1717
"ramsey/uuid": "^4.7",
1818
"socialiteproviders/discord": "^4.2",
@@ -25,12 +25,12 @@
2525
},
2626
"require-dev": {
2727
"barryvdh/laravel-debugbar": "^3.9",
28-
"barryvdh/laravel-ide-helper": "^2.13",
28+
"barryvdh/laravel-ide-helper": "^3.1",
2929
"fakerphp/faker": "^1.9.1",
3030
"laravel/pint": "^1.0",
3131
"laravel/sail": "^1.18",
3232
"mockery/mockery": "^1.4.4",
33-
"nunomaduro/collision": "^7.0",
33+
"nunomaduro/collision": "^8.0",
3434
"phpunit/phpunit": "^10.1",
3535
"spatie/laravel-ignition": "^2.0"
3636
},

0 commit comments

Comments
 (0)