Guest User

Untitled

a guest
Jan 30th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. APP_ENV=local
  2. APP_NAME=SGP
  3. APP_KEY=base64:eEtD6lSEsQGE/aDDVHgVHXKLpmaj1XzhMTtiFhOukqQ=
  4. APP_DEBUG=true
  5. APP_LOG_LEVEL=debug
  6. APP_URL=http://sgp.patrimonio
  7. DB_CONNECTION=mysql
  8. DB_HOST=127.0.0.1
  9. DB_PORT=3306
  10. DB_DATABASE=sgpmehos_bd
  11. DB_USERNAME=root
  12. DB_PASSWORD=
  13.  
  14. BROADCAST_DRIVER=log
  15. CACHE_DRIVER=file
  16. SESSION_DRIVER=file
  17. QUEUE_DRIVER=sync
  18. REDIS_HOST=127.0.0.1
  19. REDIS_PASSWORD=null
  20. REDIS_PORT=6379
  21. MAIL_DRIVER=smtp
  22. MAIL_HOST=smtp.mailtrap.io
  23. MAIL_PORT=2525
  24. MAIL_USERNAME=null
  25. MAIL_PASSWORD=null
  26. MAIL_ENCRYPTION=null
  27. PUSHER_APP_ID=
  28. PUSHER_APP_KEY=
  29. PUSHER_APP_SECRET=
  30.  
  31. <?php
  32.  
  33. use IlluminateSupportFacadesSchema;
  34. use IlluminateDatabaseSchemaBlueprint;
  35. use IlluminateDatabaseMigrationsMigration;
  36.  
  37. class CreatePermissionsTable extends Migration
  38. {
  39. /**
  40. * Run the migrations.
  41. *
  42. * @return void
  43. */
  44. public function up()
  45. {
  46. Schema::create('permissions', function (Blueprint $table) {
  47. $table->increments('id');
  48. $table->string('nome', 50);
  49. $table->string('label', 200);
  50. $table->timestamps();
  51. });
  52.  
  53. Schema::create('permission_role', function (Blueprint $table) {
  54. $table->increments('id');
  55. $table->integer('permission_id')->unsigned();
  56. $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade');
  57. $table->integer('role_id')->unsigned();
  58. $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
  59. });
  60. }
  61.  
  62. /**
  63. * Reverse the migrations.
  64. *
  65. * @return void
  66. */
  67. public function down()
  68. {
  69. Schema::dropIfExists('permissions');
  70. Schema::dropIfExists('permission_role');
  71. }
  72. }
Add Comment
Please, Sign In to add comment