How the SLIM framework uses views and templates

Source: Internet
Author: User
Want to make a comment site, feel laravel is too large, CI performance is not very good. Want to use slim, but looked at the next tutorial, found to write a route, but no write views and templates how to use, and the database. Ask how to use view templates and databases in slim.

Reply content:

Want to make a comment site, feel laravel is too large, CI performance is not very good. Want to use slim, but looked at the next tutorial, found to write a route, but no write views and templates how to use, and the database. Ask how to use view templates and databases in slim.

Too laravel large that is used lumen link description, based on Laravel micro-framework, performance than Slim, just released today.

Slim $app->post How to use it? has been reported 404 $app->get Normal

Slim need to integrate ORM, with template engine, http://www.slimframework.com/docs/features/templates.html

You can use the following two Packages for your problem:

  • View Templates Twig-View -Https://github.com/slimphp/Twig-View

  • Database illuminate/database -https://github.com/illuminate/database

How to use the above package there are README.MD documents are noted.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.