Skip to content

Instantly share code, notes, and snippets.

@devmeireles
Last active December 4, 2018 17:12
Show Gist options
  • Save devmeireles/1bb17514fbed39050c9a6b67612eb2b2 to your computer and use it in GitHub Desktop.
Save devmeireles/1bb17514fbed39050c9a6b67612eb2b2 to your computer and use it in GitHub Desktop.
inclusión del SoftDeletes()
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Eloquent\SoftDeletes;
class CreatePelicula extends Migration
{
use SoftDeletes;
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pelicula', function (Blueprint $table) {
$table->increments('id_pelicula');
$table->string('pelicula', 64);
$table->string('slug', 45);
$table->text('description');
$table->string('duracion', 45);
$table->string('archivo', 128);
$table->smallInteger('status');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pelicula');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment