File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
templates/cms/database/migrations Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Support \Facades \Schema ;
4
+ use Illuminate \Database \Schema \Blueprint ;
5
+ use Illuminate \Database \Migrations \Migration ;
6
+
7
+ class CreateMenuItemsTable extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ *
12
+ * @return void
13
+ */
14
+ public function up ()
15
+ {
16
+ Schema::create ('menu_items ' , function (Blueprint $ table ) {
17
+ $ table ->increments ('id ' );
18
+ $ table ->string ('text ' );
19
+ $ table ->string ('path ' );
20
+ $ table ->integer ('parent_menu_item_id ' )->unsigned ()->nullable ();
21
+ $ table ->foreign ('parent_menu_item_id ' )->references ('id ' )->on ('menu_items ' );
22
+ $ table ->integer ('order ' )->unsigned ()->nullable ();
23
+ $ table ->boolean ('active ' )->default (true );
24
+ });
25
+ }
26
+
27
+ /**
28
+ * Reverse the migrations.
29
+ *
30
+ * @return void
31
+ */
32
+ public function down ()
33
+ {
34
+ //
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments