Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- APP_ENV=local
- APP_NAME=SGP
- APP_KEY=base64:eEtD6lSEsQGE/aDDVHgVHXKLpmaj1XzhMTtiFhOukqQ=
- APP_DEBUG=true
- APP_LOG_LEVEL=debug
- APP_URL=http://sgp.patrimonio
- DB_CONNECTION=mysql
- DB_HOST=127.0.0.1
- DB_PORT=3306
- DB_DATABASE=sgpmehos_bd
- DB_USERNAME=root
- DB_PASSWORD=
- BROADCAST_DRIVER=log
- CACHE_DRIVER=file
- SESSION_DRIVER=file
- QUEUE_DRIVER=sync
- REDIS_HOST=127.0.0.1
- REDIS_PASSWORD=null
- REDIS_PORT=6379
- MAIL_DRIVER=smtp
- MAIL_HOST=smtp.mailtrap.io
- MAIL_PORT=2525
- MAIL_USERNAME=null
- MAIL_PASSWORD=null
- MAIL_ENCRYPTION=null
- PUSHER_APP_ID=
- PUSHER_APP_KEY=
- PUSHER_APP_SECRET=
- <?php
- use IlluminateSupportFacadesSchema;
- use IlluminateDatabaseSchemaBlueprint;
- use IlluminateDatabaseMigrationsMigration;
- class CreatePermissionsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('permissions', function (Blueprint $table) {
- $table->increments('id');
- $table->string('nome', 50);
- $table->string('label', 200);
- $table->timestamps();
- });
- Schema::create('permission_role', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('permission_id')->unsigned();
- $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade');
- $table->integer('role_id')->unsigned();
- $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('permissions');
- Schema::dropIfExists('permission_role');
- }
- }
Add Comment
Please, Sign In to add comment