for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateActionLogTable 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(config('actionlog.action_logs_table'), function (Blueprint $table) {
$table->engine = "InnoDB COMMENT='用户操作记录表'";
$table->increments('id');
$table->integer(config('actionlog.user_foreign_key'))
->unsigned()
->comment('操作者ID');
$table->string('type', 50)
->comment('操作类型');
$table->text('content')
->comment('操作描述');
$table->string('client_ip', 20)
->comment('操作者IP');
$table->string('client')
->comment('客户端信息');
$table->timestamp('created_at');
$table->index(config('actionlog.user_foreign_key'));
$table->index('type');
$table->index('created_at');
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists(config('actionlog.action_logs_table'));
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.