PHP Laravel框架入门心得 | How to study PHP Laravel Framework
PHP有不少开发框架,其中比较出名的有Symfony和Laravel。
我说说我最近入门Laravel的感受和学习方法吧。
1。第一个感受是Laravel的社区讨论和学习资源真的是太棒了,中文化也做得很好。最令人印象深刻的是下面这个学习资源
https://laracasts.com/
里面很多Laravel的视频教程,我学的是这个
https://laracasts.com/series/laravel-from-scratch-2017
不仅能学到PHP Laravel的知识,而且能学到他的编程风格,好的编程习惯等等。
另外一个是laravel china的中文社区
https://laravel-china.org/
我看到不少好资料,其中
http://laravel-china.github.io/php-the-right-way/
这个很全面的介绍了PHP的入门和编程规范,特别好。
2。Laravel本身也是一种MVC框架,model,view,controller。它的内在流程是这样,一个HTTP REQUEST从客户段浏览器进来之后,由laravel的ROUTE来接收,ROUTE可以绑定一个Controller的方法,由这个方法来处理进来的这个HTTP REQUEST。在Controller的方法中,可以引进Model,就是核心的业务实现了,Model是通过Migration跟DB连接的,可以通过对Model对象的操作,实现对数据库的操作。最后Model对象操作完了之后,把结果传给View,View会绑定一个PHP,实现前端页面的显示。
这是Laravel最基本的结构,在此基础上可以实现更多复杂的功能。
----------------------------------------------------------------------------------------------------------------------------------------------------
English Version
----------------------------------------------------------------------------------------------------------------------------------------------------------
There are many PHP frameworks, representative ones are Symfony and Laravel.
As I learned Laravel Recently, I'd like to share my experience.
1. The first impression of Laravel is that the learning community is excellent, in which it provides tremendous resources to help people study and master the framework. I like to watch video tutorial to study new knowledge, so laracasts is my favorite.
https://laracasts.com/
There are many video tutorials, what I followed is as below
https://laracasts.com/series/laravel-from-scratch-2017
Not only I can learn PHP Laravel gramar, but only I can follow the video teacher's good programming style and preference and so on.
2. Secondly, let me briefly introduce Laravel framework structure. Laravel framework follows MVC desagn pattern, Model, View, Controller. It works like below
One HTTP Request is send by client browser and it be handled by Laravel Route. Route will bind a method function of Controller, in which the method will take over the HTTP Request, meanwhile Model instances are declared at the method. The Model is connected with DB through Migration object. We can manipulate the DB by directly alter Model instance. The core business logic is implementd at controller method. Finally the output of the method will pass to View, which is the frontend presentation layer.
PHP Laravel框架入门心得 | How to study PHP Laravel Framework的更多相关文章
- php的laravel框架使用心得
最近在做一项目,是基于laravel的后台api,用于与手机交互的,数据采用json格式.下面说下怎样在两周内把一个新框架或者语言用的得心应手. 项目采用laravel5.4+dingoapi+jwt ...
- laravel框架入门
本文摘自网络,个人感觉写的很不错,决定收藏一下纯属本人学习之用 本文介绍如何开始使用 Laravel. 读完本文,你将学到: 如何安装 Laravel,新建 Laravel 程序,如何连接数据库: L ...
- laravel教程入门笔记
安装laravel框架 1.安装命令 composer create-project --prefer-dist laravel/laravel ytkah ytkah表示文件夹名,如果不写的话自动会 ...
- 使用 Composer 安装 Laravel 框架
前言: 1. Composer 安装 Laravel 有两种方式: 第一种是通过 Composer 的 create-project 命令安装 Laravel 框架, 第二种是先通过 Composer ...
- 关于Laravel框架
第1讲-Laravel介绍 1.1 什么是Laravel laravel是目前一个比较主流的框架,现在很多互联网的公司都在使用该框架.该框架的前身是symfony框架 Laravel的定位就是做一个简 ...
- Laravel开发:Laravel框架门面Facade源码分析
前言 这篇文章我们开始讲 laravel 框架中的门面 Facade,什么是门面呢?官方文档: Facades(读音:/fəˈsäd/ )为应用程序的服务容器中可用的类提供了一个「静态」接口.Lara ...
- laravel框架基础(1)---入门与介绍
1.安装laravel5.7 (composer )2018-12-28 11:59:02 [作者:struggler] Php的版本要求:php>=7.1.3 打开php OpenSSL扩展 ...
- vue框架入门和ES6介绍
vue框架入门和ES6介绍 vue-mvvm模式,vue是一种轻量级的前端框架,主要为模板渲染,数据同步,组件化,模块化,路由等. https://cn.vuejs.org/ 源码:https://g ...
- AngularJS入门心得2——何为双向数据绑定
前言:谁说Test工作比较轻松,最近在熟悉几个case,差点没疯.最近又是断断续续的看我的AngularJS,总觉得自己还是没有入门,可能是自己欠前端的东西太多了,看不了几行代码就有几个常用函数不熟悉 ...
随机推荐
- Hibernate之Hibernate的体系结构
体系结构简图: 这是一张体系结构的简图,其中的hibernate.properties文件的作用相当于配置文件hibernate.cfg.xml XML Mapping对应的就是映射文件 XXXX.h ...
- nyoj 正数性质
整数性质 时间限制:500 ms | 内存限制:65535 KB 难度:1 描述 我们知道,在数学中,对于任意两个正整数a和b,必定存在一对整数s.t使得sa+tb=gcd(a,b). 输 ...
- IT学习逆袭的新模式,全栈实习生,不8000就业不还实习费
大家好: 我是马伦,也就是多年耕耘在IT培训一线的老马.老马一直怀揣普惠教育梦想初心,一直为莘莘学子能获得高质量的IT教育服务而奋斗. 之前老马在IT培训机构任职讲师多年,也有丰富的教学管理经验.接触 ...
- php中(包括织梦cms)set_time_limit(0)不起作用的解决方法
背景介绍: 在做织梦冗余图片清理的功能时, 由于冗余图片太多,导致每次清理时都会超时, 后来在网上搜索了各种文章,网上有如下的解决方法: set_time_limit(0) ini_set('max_ ...
- EasyUI 主布局整合。
博文学习地址:http://www.cnblogs.com/xishuai/p/3620327.html html: <%@ Page Language="C#" AutoE ...
- 关于 Form 表单的 enctype 属性
enctype 属性一共有3个值 application/x-www-form-urlencoded 在发送前编码所有字符(默认) multipart/form-data 上传二进制数据, 所以在使用 ...
- CURL学习总结(1)
1.curl是什么? 百度百科定义: curl是利用URL语法在命令行方式下工作的开源文件传输工具.它被广泛应用在Unix.多种Linux发行版中,并且有DOS和Win32.W ...
- mongodb 索引的基本命令
mongodb的索引: 在数据量超大的时候,能够极大的增快查询速率,但是会降低更新效率.建立索引: db.集合.ensureIndex({属性:1}) //1代表升序 -1代表降序 db.集合.ens ...
- UVA-562 Dividing coins---01背包+平分钱币
题目链接: https://vjudge.net/problem/UVA-562 题目大意: 给定n个硬币,要求将这些硬币平分以使两个人获得的钱尽量多,求两个人分到的钱最小差值 思路: 它所给出的n个 ...
- ZOJ-1456 Minimum Transport Cost---Floyd变形+路径输出字典序最小
题目链接: https://vjudge.net/problem/ZOJ-1456 题目大意: Spring国家有N个城市,每队城市之间也许有运输路线,也可能没有.现在有一些货物要从一个城市运到另一个 ...