| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 16 | 
| 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('title'); | ||
| 20 |             $table->string('url')->nullable(); | ||
| 21 |             $table->longText('discussion')->nullable(); | ||
| 22 |             $table->string('discussable_id', 150)->index(); | ||
| 23 |             $table->string('discussable_type'); | ||
| 24 |             $table->boolean('approved')->default(false); | ||
| 25 | $table->timestamps(); | ||
| 26 | |||
| 27 |             $table->foreign('ministry_id')->references('id')->on('fg_ministries')->onDelete('cascade'); | ||
|  | |||
| 28 | }); | ||
| 29 | } | ||
| 30 | |||
| 41 | 
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: