These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | use Illuminate\Support\Facades\Schema; |
||
4 | use Illuminate\Database\Schema\Blueprint; |
||
5 | use Illuminate\Database\Migrations\Migration; |
||
6 | |||
7 | class CreateMojoPaymentDetailsTable extends Migration |
||
0 ignored issues
–
show
|
|||
8 | { |
||
9 | /** |
||
10 | * Run the migrations. |
||
11 | * |
||
12 | * @return void |
||
13 | */ |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('mojo_payment_details', function (Blueprint $table) { |
||
0 ignored issues
–
show
The method
create() does not exist on Illuminate\Support\Facades\Schema . Did you maybe mean createFreshMockInstance() ?
This check marks calls to methods that do not seem to exist on an object. This is most likely the result of a method being renamed without all references to it being renamed likewise.
Loading history...
|
|||
17 | $table->increments('id'); |
||
18 | $table->integer('user_id')->unsigned(); |
||
19 | $table->foreign('user_id')->references('id')->on('users'); |
||
20 | $table->string('buyer_email'); |
||
21 | $table->string('buyer_name'); |
||
22 | $table->string('buyer_phone'); |
||
23 | $table->string('currency'); |
||
24 | $table->string('amount'); |
||
25 | $table->string('fees'); |
||
26 | $table->string('longurl'); |
||
27 | $table->string('payment_id'); |
||
28 | $table->string('payment_request_id'); |
||
29 | $table->string('purpose'); |
||
30 | $table->string('shorturl')->nullable(); |
||
31 | $table->string('request_status'); |
||
32 | $table->string('payment_status'); |
||
33 | $table->timestamps(); |
||
34 | }); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Reverse the migrations. |
||
39 | * |
||
40 | * @return void |
||
41 | */ |
||
42 | public function down() |
||
43 | { |
||
44 | Schema::dropIfExists('mojo_payment_details'); |
||
45 | } |
||
46 | } |
||
47 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.