Skip to content

Commit

Permalink
Upgrade to laravel 5.7 (#45)
Browse files Browse the repository at this point in the history
* Upgrade laravel/framework version to 5.7.*

* Fixing Feature tests.

* Updating project files for laravel framework 5.7.*

* Fixing public folder.

* Fixing Voyager migrations.

* Removing redundant files.

* Disabling foreign_key_constraints for SQLite.
  • Loading branch information
mchekin authored Nov 27, 2019
1 parent 0b163fc commit e1aa47c
Show file tree
Hide file tree
Showing 39 changed files with 877 additions and 70 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
/storage/*.key
/vendor
/.idea
/.vagrant
.env
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
/.vagrant
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"php": "^7.2",
"fideloper/proxy": "^4.0",
"intervention/image": "^2.4",
"laravel/framework": "5.6.*",
"laravel/framework": "5.7.*",
"laravel/tinker": "~1.0",
"tcg/voyager": "^1.2"
},
Expand Down Expand Up @@ -67,4 +67,4 @@
"url": "https://larapack.io"
}
}
}
}
191 changes: 131 additions & 60 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', false),
],

'mysql' => [
Expand Down
2 changes: 1 addition & 1 deletion config/voyager.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
'tables' => [
'hidden' => ['migrations', 'data_rows', 'data_types', 'menu_items', 'password_resets', 'permission_role', 'settings'],
],
'autoload_migrations' => true,
'autoload_migrations' => false,
],

/*
Expand Down
36 changes: 36 additions & 0 deletions database/migrations/2016_01_01_000000_add_voyager_user_fields.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

use Illuminate\Database\Migrations\Migration;

class AddVoyagerUserFields extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::table('users', function ($table) {
if (!Schema::hasColumn('users', 'avatar')) {
$table->string('avatar')->nullable()->after('email')->default('users/default.png');
}
$table->bigInteger('role_id')->nullable()->after('id');
});
}

/**
* Reverse the migrations.
*/
public function down()
{
if (Schema::hasColumn('users', 'avatar')) {
Schema::table('users', function ($table) {
$table->dropColumn('avatar');
});
}
if (Schema::hasColumn('users', 'role_id')) {
Schema::table('users', function ($table) {
$table->dropColumn('role_id');
});
}
}
}
Loading

0 comments on commit e1aa47c

Please sign in to comment.