Upgrading laravel from v7 to v8

This commit is contained in:
Peter Papp
2021-02-25 16:47:32 +01:00
parent 92e02d8b57
commit 18518106ca
12 changed files with 2126 additions and 2296 deletions

View File

@@ -5,9 +5,6 @@ namespace App\Providers;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Laravel\Passport\Console\ClientCommand;
use Laravel\Passport\Console\InstallCommand;
use Laravel\Passport\Console\KeysCommand;
class AppServiceProvider extends ServiceProvider
{
@@ -34,12 +31,5 @@ class AppServiceProvider extends ServiceProvider
// Set locale for carbon dates
setlocale(LC_TIME, $get_time_locale);
// Install passport commands
$this->commands([
InstallCommand::class,
ClientCommand::class,
KeysCommand::class,
]);
}
}

View File

@@ -4,7 +4,7 @@ namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
use Laravel\Passport\Passport;
//use Laravel\Passport\Passport;
class AuthServiceProvider extends ServiceProvider
{
@@ -30,19 +30,5 @@ class AuthServiceProvider extends ServiceProvider
Gate::define('admin-settings', function ($user) {
return $user->role === 'admin';
});
Passport::routes();
Passport::tokensCan([
'master' => 'Master',
'editor' => 'Editor',
'visitor' => 'Visitor',
]);
Passport::setDefaultScope([
'master',
'editor',
'visitor',
]);
}
}

View File

@@ -8,33 +8,34 @@
],
"license": "MIT",
"require": {
"php": "^7.2",
"cartalyst/stripe-laravel": "^12.0",
"php": "^7.3",
"guzzlehttp/guzzle": "^7.2.0",
"cartalyst/stripe-laravel": "^13.1",
"doctrine/dbal": "^2.10",
"fideloper/proxy": "^4.0",
"fruitcake/laravel-cors": "^1.0",
"fruitcake/laravel-cors": "^2.0",
"gabrielelana/byte-units": "^0.5.0",
"intervention/image": "^2.5",
"intervention/image": "^2.5.1",
"jaybizzle/laravel-crawler-detect": "^1.2",
"kyslik/column-sortable": "^6.3",
"kyslik/column-sortable": "^6.4",
"laravel/fortify": "^1.7.7",
"laravel/sanctum": "^2.9",
"laravel/cashier": "^12.0",
"laravel/framework": "^7.0",
"laravel/passport": "^8.4",
"laravel/scout": "^7.2",
"laravel/framework": "^8.26.1",
"teamtnt/laravel-scout-tntsearch-driver": "^11.1",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
"laravel/ui": "^3.0",
"league/flysystem-aws-s3-v3": "^1.0",
"league/flysystem-cached-adapter": "^1.0",
"madnest/madzipper": "^1.1",
"teamtnt/laravel-scout-tntsearch-driver": "^8.3"
"madnest/madzipper": "^1.1"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.7",
"facade/ignition": "^2.0",
"facade/ignition": "^2.3.6",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.0"
},
"config": {
"optimize-autoloader": true,

4145
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -164,8 +164,8 @@ return [
TeamTNT\Scout\TNTSearchScoutServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
Laravel\Passport\PassportServiceProvider::class,
Madnest\Madzipper\MadzipperServiceProvider::class,
App\Providers\FortifyServiceProvider::class,
/*
* Package Service Providers...

View File

@@ -1,20 +0,0 @@
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\FileManagerFile;
use Faker\Generator as Faker;
use Illuminate\Support\Carbon;
$factory->define(FileManagerFile::class, function (Faker $faker) {
return [
'unique_id' => $faker->randomDigit,
'user_id' => 0,
'folder_id' => 0,
'name' => $faker->firstName,
'basename' => $faker->lastName,
'user_scope' => 'master',
'updated_at' => Carbon::now(),
'created_at' => Carbon::now()
];
});

View File

@@ -1,17 +0,0 @@
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\FileManagerFolder;
use Faker\Generator as Faker;
$factory->define(FileManagerFolder::class, function (Faker $faker) {
return [
'id' => $faker->randomDigit,
'unique_id' => $faker->randomDigit,
'user_id' => 1,
'parent_id' => 0,
'name' => $faker->sentence,
'type' => 'folder',
];
});

View File

@@ -1,12 +0,0 @@
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\Setting;
use Faker\Generator as Faker;
$factory->define(Setting::class, function (Faker $faker) {
return [
//
];
});

View File

@@ -1,28 +0,0 @@
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\User;
use Faker\Generator as Faker;
use Illuminate\Support\Str;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
];
});

View File

@@ -1,98 +0,0 @@
<?php
use App\Setting;
use Illuminate\Database\Seeder;
class ContentSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$columns = collect([
[
'name' => 'section_features',
'value' => '1',
],
[
'name' => 'section_feature_boxes',
'value' => '1',
],
[
'name' => 'section_pricing_content',
'value' => '1',
],
[
'name' => 'section_get_started',
'value' => '1',
],
[
'name' => 'header_title',
'value' => 'Simple <span style="color: #41B883">&</span> Powerful Personal Cloud Storage',
],
[
'name' => 'header_description',
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
],
[
'name' => 'features_title',
'value' => 'The Fastest Growing <span style="color: #41B883">File Manager</span> on the CodeCanyon Market',
],
[
'name' => 'features_description',
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
],
[
'name' => 'feature_title_1',
'value' => 'Truly Freedom',
],
[
'name' => 'feature_description_1',
'value' => 'You have full control over VueFileManager, no third authorities will control your service or usage, only you.',
],
[
'name' => 'feature_title_2',
'value' => 'The Sky is the Limit',
],
[
'name' => 'feature_description_2',
'value' => 'VueFileManager is cloud storage software. You have to install and running application on your own server hosting.',
],
[
'name' => 'feature_title_3',
'value' => 'No Monthly Fees',
],
[
'name' => 'feature_description_3',
'value' => 'When you running VueFileManager on your own server hosting, anybody can\'t control your content or resell your user data. Your data is safe.',
],
[
'name' => 'pricing_title',
'value' => 'Pick the <span style="color: #41B883;">Best Plan</span> For Your Needs',
],
[
'name' => 'pricing_description',
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
],
[
'name' => 'get_started_title',
'value' => 'Ready to Get <span style="color: #41B883">Started</span><br> With Us?',
],
[
'name' => 'get_started_description',
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
],
[
'name' => 'footer_content',
'value' => '© 2020 Simple & Powerful Personal Cloud Storage. Developed by <a href="https://hi5ve.digital" target="_blank">Hi5Ve.Digital</a>',
],
]);
$columns->each(function ($content) {
Setting::updateOrCreate($content);
});
}
}

View File

@@ -11,7 +11,6 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
$this->call(PageSeeder::class);
$this->call(ContentSeeder::class);
//
}
}

View File

@@ -1,40 +0,0 @@
<?php
use App\Page;
use Illuminate\Database\Seeder;
class PageSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$columns = collect([
[
'visibility' => 1,
'title' => 'Terms of Service',
'slug' => 'terms-of-service',
'content' => 'Laoreet cum hendrerit iaculis arcu phasellus congue et elementum, pharetra risus imperdiet aptent posuere rutrum parturient blandit, dapibus tellus ridiculus potenti aliquam sociis turpis. Nullam commodo eget laoreet risus cursus vel placerat, in dapibus sociis gravida faucibus sodales, fringilla potenti elit semper iaculis ullamcorper. Dignissim vulputate pretium montes pellentesque mollis, consectetur adipiscing curabitur semper sem rhoncus, litora viverra curae proin.',
],
[
'visibility' => 1,
'title' => 'Privacy Policy',
'slug' => 'privacy-policy',
'content' => 'Sit orci justo augue maecenas laoreet consectetur natoque magnis in viverra sagittis, himenaeos urna facilisis mus proin primis diam accumsan tristique inceptos. Primis quisque posuere sit praesent lobortis feugiat semper convallis facilisis, vivamus gravida ligula nostra curae eu donec duis parturient senectus, arcu dolor viverra penatibus natoque cum nisi commodo. Litora sociis mauris justo nullam suspendisse mattis maecenas nascetur congue phasellus cras ultricies posuere donec, dapibus egestas diam lacus ornare montes senectus tincidunt eu taciti sed consequat.',
],
[
'visibility' => 1,
'title' => 'Cookie Policy',
'slug' => 'cookie-policy',
'content' => 'Metus penatibus ligula dolor natoque non habitasse laoreet facilisis, libero vivamus eget semper vulputate interdum integer, phasellus lorem enim blandit consectetur nullam sollicitudin. Hendrerit interdum luctus ut in molestie himenaeos eros cum laoreet parturient est, eu lectus hac et netus viverra dictumst congue elit sem senectus litora, fames scelerisque adipiscing inceptos fringilla montes sociosqu suscipit auctor potenti. Elementum lacus vulputate viverra ac morbi ligula ipsum facilisi, sit eu imperdiet lacinia congue dis vitae.',
],
]);
$columns->each(function ($page) {
Page::updateOrCreate($page);
});
}
}