Issue
I have old 5.5 version laravel project file when I run it , its ui not work I think that need update . right? I dont like laravel 8 blade template vue How can I update to laravel 8 without losing functionality in project here is composer file
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"coingate/coingate-php": "^2.0",
"fideloper/proxy": "~3.3",
"hesto/multi-auth": "^2.0",
"intervention/image": "^2.4",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"nwidart/laravel-modules": "^2.7",
"stripe/stripe-php": "^6.0"
},
"require-dev": {
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~6.0",
"symfony/thanks": "^1.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files" :["app/Http/helpers/helpers.php"]
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
laravel new version are more complex not simple as before I like laravel but not like frequent updating new version their UI depend on vue.js intentionally
Solution
According to my experience I upgraded from laravel 7.2 to laravel 8 Check upgrade
You have to check all dependencies required in version 8. As I remembered in version 5 routes are in app folder but in new version routes sre in root folder so you will face many problem.
There is more different b/w laravel8
into laravel5
. Even folder structure are different so.
If you developed your projects then develop from scratch.
- Download a fresh laravel without any package
- check dependencies and all packages mentioned in your old projects
composer.json
andcomposer.lock
. Don't forget to checkpackage.json
if exists - Now mention all the packages (with upgraded version by comparing using link ) in your new projects
composer.json
file . composer update
Now you have to check if your projects can run in upgraded version.
5. Copy vendor
folder composer.json
file and composer.lock
and bootstrap
folder
6. Now php artisan serve
7. If your projects running smoothly then go further
8. Copy your routes.php
from app folder of old project to routes/web.php
new projects
9. Copy all view from old projects to new projects
10. Copy all your models and all your controllers
11. Now add "files" :["app/Http/helpers/helpers.php"]
lines in composer.json
12.now composer dump-autoload
Then run your server if runs well then your code can work on version 8 environment.
don't forgot to check all folder from app and config folder if you find any extra file just copt it p.
Now here is an problem with your admin panel or login panel if you have otp or another extra feature do it from scratch.
here is no commands to upgrade from version 5 to version 8.
Answered By - Ronny Dsouza
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.