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
CodePudding user response:
I have had tried to upgrade a project from 5.6 to 8, and outcome in summary: don't bother.
Syntaxes are different (e.g., routes). Folder structure is same, and about this 'UI depend on vue.js intentionally', you can just not use those files and make new. Yes by default they are now using tailwind, but just delete the file and make your own UI, in any framework you want. Or just use blades.
As the other comment also mentioned, you're better off creating a new Laravel 8 project and then importing modules 1-by-1 and change codes if necessary. In all fairness you'll be doing the same work if you try to upgrade from 5.6 to 8 but with more hassle.
CodePudding user response:
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 .
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.
Note: If you know your projects well then go with my tricks.