What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-01-27 08:17:14
laravel migration make auto increment
$table->increments('id'); Add solution -
PHP 2021-11-12 12:30:14
comment = Comment::find($this->route('comment')); in laravel
Schema::create('comments', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id')->unsigned(); $table->foreign('user_id')->references('id')->on('users')->onCascad... Add solution -
Other 2021-10-29 06:59:08
how to add some rows in database when migration
// Create the table Schema::create('users', function($table){ $table->increments('id'); $table->string('email', 255); $table->string('password', 64); $table->boolean('verified'); $table->string('t... Add solution -
PHP 2021-10-08 03:31:05
Updating the database file migration
<?phpuse Illuminate\Support\Facades\Schema;use Illuminate\Database\Schema\Blueprint;use Illuminate\Database\Migrations\Migration;class CreateContactsTable extends Migration{ /** * Run the migrations. * * @return void */ public fun... Add solution -
PHP 2021-09-01 00:03:02
laravel view not created using foreign keys
Schema::create('larachat_chat_rooms', function (Blueprint $table) { $table->increments('id'); //Foreign key must be unsignedBigInteger $table->unsignedBigInteger('creator_id'); $table->softDeletes(); $table-&... Add solution -
PHP 2021-08-31 06:44:01
php artisan migrate SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'password_resets' already exists
if(!Schema::hasTable('users')){ Schema::create('users', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('email')->unique(); $table->string('password'); ... Add solution