| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 14 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 14 | public function up() | ||
| 15 |     { | ||
| 16 |         Schema::create('fg_discussions', function (Blueprint $table) { | ||
| 17 |             $table->string('id')->index(); | ||
| 18 |             $table->string('ministry_id', 150)->index(); | ||
| 19 |             $table->string('url')->nullable(); | ||
| 20 |             $table->longText('discussion')->nullable(); | ||
| 21 |             $table->string('discussable_id', 150)->index(); | ||
| 22 |             $table->string('discussable_type'); | ||
| 23 | $table->timestamps(); | ||
| 24 | |||
| 25 |             $table->foreign('ministry_id')->references('id')->on('fg_ministries')->onDelete('cascade'); | ||
|  | |||
| 26 | }); | ||
| 27 | } | ||
| 28 | |||
| 39 | 
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: