Skip to content

Commit 8002f6f

Browse files
committed
Merge remote-tracking branch 'origin/main' into 38_fix_adding_middleware_for_telescope_authorization
# Conflicts: # tests/InitCommandTest.php
2 parents 21013f1 + eb56f2e commit 8002f6f

20 files changed

+503
-298
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"php-mock/php-mock-phpunit": "^2.10",
3333
"ext-json": "*",
3434
"ronasit/laravel-helpers": ">=3.5.7",
35-
"winter/laravel-config-writer": "^1.2"
35+
"winter/laravel-config-writer": ">=1.2.1"
3636
},
3737
"require-dev": {
3838
"fakerphp/faker": "^1.23.1",

composer.lock

Lines changed: 41 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/views/add_default_user.blade.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
use Illuminate\Support\Facades\App;
33
use Illuminate\Support\Facades\DB;
44
use Illuminate\Support\Facades\Hash;
5-
use RonasIT\Support\Traits\MigrationTrait;
65

7-
class AddDefaultUser extends Migration
6+
return new class extends Migration
87
{
9-
use MigrationTrait;
10-
11-
public function up()
8+
public function up(): void
129
{
1310
if (!App::environment('testing')) {
1411
DB::table('users')->insert([
@@ -20,12 +17,12 @@ public function up()
2017
}
2118
}
2219

23-
public function down()
20+
public function down(): void
2421
{
2522
if (!App::environment('testing')) {
2623
DB::table('users')
2724
->where('email', '{{ $email }}')
2825
->delete();
2926
}
3027
}
31-
}
28+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
use Illuminate\Database\Migrations\Migration;
2+
use Illuminate\Support\Facades\App;
3+
use Illuminate\Support\Facades\DB;
4+
use Illuminate\Support\Facades\Hash;
5+
6+
return new class extends Migration
7+
{
8+
public function up(): void
9+
{
10+
if (!App::environment('testing')) {
11+
DB::table('admins')->insert([
12+
'email' => '{{ $email }}',
13+
'password' => Hash::make('{{ $password }}'),
14+
]);
15+
}
16+
}
17+
18+
public function down(): void
19+
{
20+
if (!App::environment('testing')) {
21+
DB::table('admins')
22+
->where('email', '{{ $email }}')
23+
->delete();
24+
}
25+
}
26+
};
Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
use Illuminate\Database\Migrations\Migration;
22
use Illuminate\Database\Schema\Blueprint;
3-
use Illuminate\Support\Facades\App;
4-
use Illuminate\Support\Facades\DB;
5-
use Illuminate\Support\Facades\Hash;
63
use Illuminate\Support\Facades\Schema;
74
use RonasIT\Support\Traits\MigrationTrait;
85

9-
class AdminsCreateTable extends Migration
6+
return new class extends Migration
107
{
118
use MigrationTrait;
129

@@ -17,17 +14,10 @@ public function up()
1714
$table->string('email')->unique();
1815
$table->string('password');
1916
});
20-
21-
if (!App::environment('testing')) {
22-
DB::table('admins')->insert([
23-
'email' => '{{ $email }}',
24-
'password' => Hash::make('{{ $password }}'),
25-
]);
26-
}
2717
}
2818

2919
public function down()
3020
{
3121
Schema::dropIfExists('admins');
3222
}
33-
}
23+
};

resources/views/users_add_clerk_id_field.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use Illuminate\Support\Facades\Schema;
44
use RonasIT\Support\Traits\MigrationTrait;
55

6-
class UsersAddClerkIdField extends Migration
6+
return new class extends Migration
77
{
88
use MigrationTrait;
99

@@ -20,4 +20,4 @@ public function down()
2020
$table->dropColumn('clerk_id');
2121
});
2222
}
23-
}
23+
};

0 commit comments

Comments
 (0)