for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateGuardiansTable 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(): void
Schema::create(config('cortex.auth.tables.guardians'), function (Blueprint $table) {
// Columns
$table->increments('id');
$table->string('username');
$table->string('password');
$table->rememberToken();
$table->string('email');
$table->boolean('is_active')->default(true);
$table->timestamp('last_activity')->nullable();
$table->auditableAndTimestamps();
auditableAndTimestamps()
Illuminate\Database\Schema\Blueprint
timestamp()
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.
$table->softDeletes();
// Indexes
$table->unique('email');
$table->unique('username');
});
}
* Reverse the migrations.
public function down(): void
Schema::dropIfExists(config('cortex.auth.tables.guardians'));
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.