Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | _<?php |
||
23 | public function up() |
||
24 | { |
||
25 | Schema::create('event_datetimes', function (Blueprint $table) { |
||
26 | $table->bigIncrements('id'); |
||
27 | $table->unsignedBigInteger('eventid')->nullable(); |
||
28 | $table->foreign('eventid')->references('id')->on('events'); |
||
|
|||
29 | |||
30 | $table->foreignId('eventid') |
||
31 | ->constrained() |
||
32 | ->onUpdate('cascade') |
||
33 | ->onDelete('cascade'); |
||
34 | $table->date('event_date'); |
||
35 | $table->time('event_time', $precision = 0); |
||
36 | $table->date('event_end_date')->nullable(); |
||
37 | $table->time('event_end_time', $precision = 0)->nullable(); |
||
38 | $table->timestamps(); |
||
39 | }); |
||
40 | } |
||
41 | |||
52 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: