How to change the idea of native php and laravel to laravel?

I am currently working on a web site based on php + mariadb
, but recently I want to change the web site to laravel traffic
, but it is impossible to achieve it in the short term.

so I want to ask the great gods
how can I change the code to achieve the idea of laravel?
for example, I know

$do->query("SELECT ... ");

this is not done in laravel

  1. so how can I write a similar idea through php?
  2. there are no other laravel practices in php native? The interaction between the station and css , jquery ?
  3. I now use require_once to introduce the php version of my plan, but I believe my thinking is still wrong. So you want to "poop" the principle of laravel?
  4. how can some native code structures be improved?
  5. or is it because I think too much that I can change the existing web site to a laravel framework? If that doesn"t work, how to correctly improve the code structure and ideas?

charge

it seems that there is no way to change it directly, so we can only write one again with laravel?
is there any problem that can be violated by php natively, which can be written in a laravel-like way of thinking?


give some points to consider. For example, Laravel currently needs PHP7, then you have to consider whether your code is PHP7 first, and then,
Laravel or other modern PHP frameworks basically use composer to handle automatic loading, then you can remove most of the require_once code, and then see if your site implements page controller or front controller, if it is page controller, then you need to achieve a section of dispatching request logic on the route of Laravel. Finally, the code that interacts with the database is abstracted into a separate layer, and if you want to use the model in Laravel, the code in this layer will have to be changed a lot.


is directly re-implemented in Laravel. The magic will be happy for a moment, and then you will be blinded by crying.


Laravel is not very good either.

if you really want to do something for the php industry, it is recommended to rewrite php into jquery mode. This is really for the benefit of the people.

Menu