This repository was archived by the owner on Oct 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +28
-21
lines changed
Expand file tree Collapse file tree 4 files changed +28
-21
lines changed Original file line number Diff line number Diff line change 44use Illuminate \Database \Schema \Blueprint ;
55use Leaf \Schema ;
66
7- class CreateUsers extends Database {
8- /**
9- * Run the migrations.
10- *
11- * @return void
12- */
13- public function up () {
7+ class CreateUsers extends Database
8+ {
9+ /**
10+ * Run the migrations.
11+ *
12+ * @return void
13+ */
14+ public function up ()
15+ {
1416 // if (!static::$capsule::schema()->hasTable("users")):
1517 // static::$capsule::schema()->create("users", function (Blueprint $table) {
1618 // $table->increments('id');
@@ -26,14 +28,15 @@ public function up() {
2628
2729 // you can now build your migrations with schemas [EXPERIMENTAL]
2830 Schema::build (static ::$ capsule , dirname (__DIR__ ) . "/Schema/users.json " );
29- }
31+ }
3032
31- /**
32- * Reverse the migrations.
33- *
34- * @return void
35- */
36- public function down () {
37- static ::$ capsule ::schema ()->dropIfExists ("users " );
38- }
33+ /**
34+ * Reverse the migrations.
35+ *
36+ * @return void
37+ */
38+ public function down ()
39+ {
40+ static ::$ capsule ::schema ()->dropIfExists ("users " );
41+ }
3942}
Original file line number Diff line number Diff line change 22
33use Leaf \Database ;
44
5- class CreatePasswordResets extends Database {
5+ class CreatePasswordResets extends Database
6+ {
67 /**
78 * Run the migrations.
89 *
910 * @return void
1011 */
11- public function up () {
12- if (!static ::$ capsule ::schema ()->hasTable ("password_resets " )):
12+ public function up ()
13+ {
14+ if (!static ::$ capsule ::schema ()->hasTable ("password_resets " )) :
1315 static ::$ capsule ::schema ()->create ("password_resets " , function ($ table ) {
1416 $ table ->string ('email ' )->index ();
1517 $ table ->string ('token ' );
@@ -23,7 +25,8 @@ public function up() {
2325 *
2426 * @return void
2527 */
26- public function down () {
28+ public function down ()
29+ {
2730 static ::$ capsule ::schema ()->dropIfExists ("password_resets " );
2831 }
2932}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class DatabaseSeeder extends Seeder
1111 *
1212 * @return void
1313 */
14- public function run () : array
14+ public function run (): array
1515 {
1616 return [
1717 UsersSeeder::class,
Original file line number Diff line number Diff line change 11<?php
2+
23namespace App \Database \Seeds ;
34
45use App \Database \Factories \UserFactory ;
You can’t perform that action at this time.
0 commit comments