Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function up() |
||
24 | { |
||
25 | Schema::create('tickets', function (Blueprint $table) { |
||
26 | $table->bigIncrements('id'); |
||
27 | |||
28 | $table->unsignedBigInteger('eventid')->nullable(); |
||
29 | $table->foreign('eventid')->references('id')->on('events'); |
||
|
|||
30 | |||
31 | $table->foreignId('eventid') |
||
32 | ->constrained() |
||
33 | ->onUpdate('cascade') |
||
34 | ->onDelete('cascade'); |
||
35 | $table->string('name'); |
||
36 | $table->integer('amount'); |
||
37 | $table->integer('quantity'); |
||
38 | $table->text('description')->nullable(); |
||
39 | $table->text('status')->nullable(); |
||
40 | $table->integer('minimum_order')->default(1); |
||
41 | $table->integer('maximum_order')->default(1); |
||
42 | $table->integer('hide_on_sold_out')->default(1); |
||
43 | $table->integer('show_quantity_remaining')->default(1); |
||
44 | $table->timestamps(); |
||
45 | }); |
||
46 | } |
||
47 | |||
58 |
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: