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\Migrations\Migration;
class CreateMeetingAttachmentsTable 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.
{
public function up()
Schema::create('meeting_attachments', function (Blueprint $table) {
$table->increments('id');
$table->string('filename');
$table->string('storage_filename');
$table->float('size')->comment('kilobytes');
$table->unsignedInteger('meeting_id')->nullable();
$table->foreign('meeting_id')
->references('id')
->on('meetings')
->onDelete('set null') // so we can later see that the attachment is not used and delete the file
->onUpdate('cascade');
$table->unsignedInteger('owner_id')->nullable();
$table->foreign('owner_id')
->on('members')
->onDelete('set null')
$table->timestamps();
});
}
public function down()
Schema::drop('meeting_attachments');
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.