This repository was archived by the owner on Oct 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 11<?php
22
3+ use Leaf \Schema ;
34use Leaf \Database ;
45use Illuminate \Database \Schema \Blueprint ;
5- use Leaf \Schema ;
66
77class CreateUsers extends Database
88{
99 /**
1010 * Run the migrations.
11- *
1211 * @return void
1312 */
1413 public function up ()
@@ -26,13 +25,20 @@ public function up()
2625 // });
2726 // endif;
2827
28+ /**
29+ * Leaf Schema allows you to build migrations
30+ * from a JSON representation of your database
31+ *
32+ * Check app/database/schema/users.json for an example
33+ *
34+ * Docs @ https://leafphp.dev/docs/mvc/schema.html
35+ */
2936 // you can now build your migrations with schemas
3037 Schema::build ('users ' );
3138 }
3239
3340 /**
3441 * Reverse the migrations.
35- *
3642 * @return void
3743 */
3844 public function down ()
Original file line number Diff line number Diff line change 11<?php
22
33use Leaf \Database ;
4+ use Illuminate \Database \Schema \Blueprint ;
45
56class CreatePasswordResets extends Database
67{
78 /**
89 * Run the migrations.
9- *
1010 * @return void
1111 */
1212 public function up ()
1313 {
14- if (!static ::$ capsule ::schema ()->hasTable (" password_resets " )) :
15- static ::$ capsule ::schema ()->create (" password_resets " , function ($ table ) {
14+ if (!static ::$ capsule ::schema ()->hasTable (' password_resets ' )) :
15+ static ::$ capsule ::schema ()->create (' password_resets ' , function (Blueprint $ table ) {
1616 $ table ->string ('email ' )->index ();
1717 $ table ->string ('token ' );
1818 $ table ->timestamp ('created_at ' )->nullable ();
@@ -22,11 +22,10 @@ public function up()
2222
2323 /**
2424 * Reverse the migrations.
25- *
2625 * @return void
2726 */
2827 public function down ()
2928 {
30- static ::$ capsule ::schema ()->dropIfExists (" password_resets " );
29+ static ::$ capsule ::schema ()->dropIfExists (' password_resets ' );
3130 }
3231}
You can’t perform that action at this time.
0 commit comments