初学者的 Laravel PHP 框架

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13320446/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 07:24:45  来源:igfitidea点击:

Laravel PHP framework for beginners

phpframeworksweblaravel

提问by Raven

I just learned PHP and made quite a few trivial web apps from scratch like http://skedyul.herokuapp.com/and http://codeknack.herokuapp.com/

我刚刚学习了 PHP 并从头开始制作了很多琐碎的网络应用程序,例如http://skedyul.herokuapp.com/http://codeknack.herokuapp.com/

Now I wanted to get into more advance PHP stuffs and venture into MVC frameworks. I've found CodeIgniter, CakePHP, ZEND, and Laravel.

现在我想进入更高级的 PHP 内容并冒险进入 MVC 框架。我找到了 CodeIgniter、CakePHP、ZEND 和 Laravel。

Of all the frameworks I found, Laravelwas the one quite praised by developers nowadays for its features.

在我找到的所有框架中,Laravel是当今开发人员对其功能非常称赞的框架。

I don't have a knowledge about basic MVC principles. And my question: Is Laravel easy/good for a beginning php developer to learn from? Or does it require some working knowledge of MVC before I can start?

我不了解基本的 MVC 原则。 我的问题是:Laravel 是否容易/适合初学者学习 php 开发人员?或者在我开始之前它是否需要一些 MVC 的工作知识?

回答by JulienTant

I tried a lot of frameworks, and Laravel is a good one for me.

我尝试了很多框架,Laravel 对我来说是一个很好的框架。

The documentation is awesome, it's not just a webpage with a lot of information to learn, it gives you a lot of examples that will help you.

文档很棒,它不仅仅是一个包含大量信息的网页,它还为您提供了很多可以帮助您的示例。

Laravel is provided with a lot of powerful tools, such as an powerful and expressive ORM ( called Eloquent ), a template engine ( Blade ), a data validation system, which makes validation of user inputs a piece of cake...

Laravel 提供了很多强大的工具,例如强大且富有表现力的 ORM(称为 Eloquent)、模板引擎(Blade)、数据验证系统,这使得用户输入的验证变得轻而易举……

And the best of all, the community is very very helpful & friendly. Check the Forumsor the IRC channel #laravel on the Freenode server ( http://laravel.com/irc)

最重要的是,社区非常乐于助人和友好。查看Freenode 服务器上的论坛或 IRC 频道 #laravel ( http://laravel.com/irc)

Now you can just give it a try, and if it doesn't look ok for you, just try another framework !

现在您可以尝试一下,如果它看起来不适合您,请尝试另一个框架!

回答by mickael23

Laravel is a very good php-framework, but many of the laravel tutorials are harmful for beginners because they:

Laravel 是一个非常好的 php 框架,但是很多 Laravel 教程对初学者来说是有害的,因为它们:

  1. force the user to write code in routes, not controllers.
  2. force the user to use @layout in EVERY one of the view files.
  1. 强制用户在路由中编写代码,而不是在控制器中。
  2. 强制用户在每个视图文件中使用 @layout。