for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Capsule\Manager as Capsule;
use \Illuminate\Database\Schema\Blueprint as Blueprint;
class CreateMatchPlayersTable
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 run()
Capsule::schema()->dropIfExists('match_players');
Capsule::schema()->create('match_players', function (Blueprint $table) {
$table->increments('id');
$table->integer('match_id');
$table->integer('team_id');
$table->integer('player_id')->default(0);
$table->unsignedTinyInteger('goals')->default(0);
$table->unsignedTinyInteger('vote')->default(6);
$table->timestamps();
});
}
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.