Using BLADE without Laravel?

0

I am learning PHP and I would like to be able to use BLADE. Is there any way to use it without having to use Laravel?

I found some information in English, but I do not know how to start using it. This is the one that I have found for example: link

Thank you very much!

    
asked by ZeR0ByTe 07.06.2018 в 10:33
source

1 answer

2

you can use other template engines, you have PlatesPHP, Twig, among others, my favorite is Twig that is from the Symfony frameworl, it is very powerful and has many features, but if you want to use that one, you have to have installed Composer.

Once you have installed Composer, you must go to the folder of your project and add Windwalker Edge to your project.

To add the template engine to your project you must add it in the composer.json and if you do not have it, you must create it

After that you would be ready to use it, you just have to go to the file from where you want to render and ...

In the example of just rendered html, you are not showing any views because you did not define a route where these views are

To define these routes what you have to do is:

By default it will always take you the first route

If you read carefully everything in the URL that you passed, it tells you how to do things step by step.

Let me know if it worked for you, regards.

    
answered by 07.06.2018 / 16:23
source