for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of Friends.
*
* (c) Christopher Lass <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFriendsTable extends Migration
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()
Schema::create('friends', function (Blueprint $table) {
$table->unsignedInteger('sender_id')->index();
$table->foreign('sender_id')
->references('id')
->on(\Config::get('friends.users_table'))
->onDelete('cascade');
$table->unsignedInteger('recipient_id')->index();
$table->foreign('recipient_id')
$table->tinyInteger('status')->default(0);
$table->timestamps();
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists('friends');
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.