by Devin Yang
(This article was automatically translated.)

Published - 7 years ago ( Updated - 7 years ago )

At the beginning, my backend was a framework created by myself, which also uses the MVC architecture, database connection and environment configuration files made by myself, etc.
Include your own template syntax, until I want my framework to support Restful, I have an idea,
Why should I rewrite the same function myself when others have already written it? Would it be better to write it out?
So I started to switch to the framework, and I used Slim at the beginning, mainly because it supports a lower version of php.
Because the classes created by themselves use namespaces, there is no problem in porting them to Slim.
But after trying Slim's twig templates, I feel that it is not as easy to use as Laravel's blade template.
Although I used Slim's framework at the time, I chose to use Laravel's blade template engine on Slim: p,
At that time, I installed philo/laravel-blade . After writing slim for a while, I still prefer the various functions of Laravel.
So I will do the Slim-to-Laravel job again. The process is very smooth, and there is no need to modify the already written template.
It is probably to build the Controller and routing, and do some copy and paste work. It takes less than a day and a half.
Just converted my slime framework to Laravel 5.3.

This time I want to upgrade Larave in the background again, the main reason is because I like the new routing function on 5.5 too much ( in Laravel 5.5, the basic routing is easy to use ),
This will be a lot more convenient for me when I do the front-end versioning. Besides, it is not the first time for the background upgrade to do this kind of thing. It is not difficult for me.
I have done an upgrade to Laravel 5.4 in Laravel 5.3 , with some experience,
So I upgraded again today, and it was easy to do in 30 minutes, so let's talk about my way.

Of course, it is recommended to take a look at the upgrade guide on Laravel's official website:
https://laravel.com/docs/5.5/upgrade

The following is a personal experience sharing, for reference only:

Since my background code and the Class I use are originally my own independent Source Code, it is super easy to upgrade.
It feels a bit like installing a kit feel on the new version of Laravel.

The following is my upgrade process:
1. Directly build a new Laravel 5.5 Project and initialize git version control. I want to know the difference between the old version and the new version.
(Initialize a new Project directly here because I don’t need git modification records before 5.4, and I’ll lose weight by the way.)
2. Modify compose.json, and add the ow_source used in the background to the folder of the app. ow_source is some Classes that survived before I used the framework, and some libraries that need to be used in the background (laravel-debugbar&guzzle).
composer.json
3. Paste the modified .env file into the Laravel 5.5 Project.
4. I have an independent views folder called ow, which contains the layouts, forms, lists, views, and partial in the background, all copied to the resource/views under the new laravel.
5. Several related file adjustments, app/Http/Kernel, some independent Middleware, config/app.php, config/database.php and config/filesystems.php.
6. Migration files and seeds related to the database, and the basic data table in my background (two files).
7. Copy your own package.json, js and css in resource/asset/ to the new version of Laravel, and install npm install.

In less than half an hour, it was done. Then test, add modification and deletion, backup and restore, DebugBar, OAuth login functions.
badkend

Clean installation, backup data restoration php artisan migrate:refresh and php artisan db:seed are all fine: D.
In this update, in the place where OAuth verification is performed, I added an extra login name, because an error occurred during login, saying that the name login could not be found.
Route::get('/我的登入/auth','OAuthCallbackController@sso')->name('login');
restore

Tags: laravel

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


Laravel, Packages,

What packages do you have to install on all Laravel applications you build?

What kind of packages are you sure to install on your Laravel application? There are four-star kits here, almost everyone will install them, Click here to see, how do I say, my actual use experience sharing...

dlaravel

Safe Update D-Laravel

How to upgrade the current D-Laravel. If your current use environment is very smooth and you have not encountered any problems, you don't need to update it. If you want to use the latest version, and bug fixes, etc., please read this article carefully, In order to ensure a smooth upgrade, the following is the recommended way to upgrade D-Laravel.