We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 1 |
| Paths | 1 |
| Total Lines | 34 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function up() |
||
| 20 | { |
||
| 21 | Schema::create('links', function (Blueprint $table) { |
||
| 22 | $table->increments('id'); |
||
| 23 | |||
| 24 | $table->unsignedInteger('from_id'); |
||
| 25 | $table->string('from_type'); |
||
| 26 | $table->index(['from_id', 'from_type']); |
||
| 27 | |||
| 28 | $table->unsignedInteger('to_id')->nullable(); |
||
| 29 | $table->string('to_type')->nullable(); |
||
| 30 | $table->index(['to_id', 'to_type']); |
||
| 31 | |||
| 32 | $table->string('external')->nullable(); |
||
| 33 | |||
| 34 | $table->timestamps(); |
||
| 35 | }); |
||
| 36 | |||
| 37 | Schema::table('menus', function (Blueprint $table) { |
||
| 38 | $table->removeColumn('hyperlink'); |
||
| 39 | |||
| 40 | $table->removeColumn('page_id'); |
||
| 41 | }); |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Link the homepage menu to the homepage page. |
||
| 45 | */ |
||
| 46 | $page = app(PageRepository::class)->whereID(1); |
||
| 47 | $menu = app(MenuRepository::class)->whereID(1); |
||
| 48 | |||
| 49 | /** @var Link $link */ |
||
| 50 | $link = app(Link::class); |
||
| 51 | |||
| 52 | $link->connect($menu, $page)->save(); |
||
|
|
|||
| 53 | } |
||
| 65 |