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 CreateRecipeRecipeTranslationsTable 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('recipe__recipe_translations', function(Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('name');
$table->text('content');
$table->integer('recipe_id')->unsigned();
$table->string('locale')->index();
$table->unique(['recipe_id', 'locale']);
$table->foreign('recipe_id')->references('id')->on('recipe__recipes')->onDelete('cascade');
});
}
* Reverse the migrations.
public function down()
Schema::drop('recipe__recipe_translations');
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.