for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Capsule\Manager as Capsule;
/**
* Class CreateCartItems
*/
class CreateCartItems
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* Run the migrations.
*
* @return void
public function up()
Capsule::schema()->create('cart_items', function (Blueprint $table) {
$table->increments('id')->index()->unique();
$table->integer('user_id')->unique();
$table->json('data');
$table->timestamps();
$table->softDeletes();
});
}
* Reverse the migrations.
public function down()
Capsule::schema()->dropIfExists('cart_items');
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.