How the slim framework uses views and templates

Source: Internet
Author: User
I want to make a comment website. I feel laravel is too huge and ci performance is not good. I want to use slim, but I have read the next tutorial and found that I have written the route, but I have not written the view and template, and I have a database. ask how to use the view template and database in slim. I want to make a comment website. I feel laravel is too huge and ci performance is not good. I want to use slim, but I have read the next tutorial and found that I have written the route, but I have not written the view and template, and I have a database. ask how to use the view template and database in slim.

Reply content:

I want to make a comment website. I feel laravel is too huge and ci performance is not good. I want to use slim, but I have read the next tutorial and found that I have written the route, but I have not written the view and template, and I have a database. ask how to use the view template and database in slim.

If Laravel is too large, we will use lumen link to describe it. The Laravel-based micro-framework has better performance than slim. It was just released today.

How to use slim $ app-> post? Always report 404 $ app-> get normal

Slim needs to integrate their own orm, with the template engine, http://www.slimframework.com/docs/features/templates.html

You can use the following two Packages for your problem:

  • View TemplateTwig-ViewHttps://github.com/slimphp/Twig-View

  • Databaseilluminate/databaseHttps://github.com/illuminate/database

Usage: The Readme. md documentation is provided in the above package.

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.