《Slides Dev Web》02. Introduction aux frameworks PHP
org/web/20160316065751/http://blog.mazenod.fr/2010/01/design-pattern-mvc-zoom-sur-la- couche-modele-dal-dao-orm-crud/ 6http://ui-patterns.com/ 2 Figure 1: MVC 3 Bonnes pratiques • Heavy Model, Light Controller code qu’une appli standalone – Plus de requêtes • Solutions – Cache de pages, d’opcode – Jointures ORM, vues, procédures stockées – Outils d’optimisation : YSlow, page speed, mytop 6 Frameworks PHP • réelle de notre base de données et offrir une interface orientée objet. Un Object-Relational Mapping ou ORM(3) dans le jargon. query( "SELECT * FROM `personnes` ". "WHERE0 码力 | 24 页 | 1.03 MB | 1 年前3Laravel 5.2 中文文档
Illuminate\View\View 五、数据库 起步 1、简介 Laravel 让连接多种数据库以及对数据库进行查询变得非常简单,不论使用原生 SQL、还是 查询构建器,还是 Eloquent ORM。目前,Laravel 支持四种类型的数据库系统: MySQL Postgres SQLite SQL Server 配置 Laravel 让连接数据 读/写连接 有时候你希望使用一个数据库连接做查询,另一个数据库连接做插入、更新和删除, Laravel 使得这件事情轻而易举,不管你用的是原生 SQL,还是查询构建器,还是 Eloquent ORM,合适的连接总是会被使用。 想要知道如何配置读/写连接,让我们看看下面这个例子: 'mysql' => [ 'read' => [ 'host' => '192.168 DB::rollBack(); 最后,你可以通过 commit 方法提交事务: DB::commit(); 注意:使用 DB 门面的事务方法还可以用于控制查询构建器和 Eloquent ORM 的事务。 4、使用多个数据库连接 使用多个数据库连接的时候,可以使用 DB 门面的 connection 方法访问每个连接。传递给 connection 方法的连接名对应配置文件 config/database0 码力 | 377 页 | 4.56 MB | 1 年前3Laravel 3.2 Documentation
................................................................................... 85 Eloquent ORM .................................................................................................. directory or use the "Artisan" command-line tool to automatically install them. The Eloquent ORM is the most advanced PHP ActiveRecord implementation available. With the capacity to easily apply configuration, routes, migrations, tasks, and more. A bundle could be everything from a database ORM to a robust authentication system. Modularity of this scope is an important aspect that has driven0 码力 | 139 页 | 1.13 MB | 1 年前3Laravel 5.0 Documentation
Expressions vii. Inserts viii. Updates ix. Deletes x. Unions xi. Pessimistic Locking iii. Eloquent ORM i. Introduction ii. Basic Usage iii. Mass Assignment iv. Insert, Update, Delete v. Soft Deleting This interface allows the authentication system to work with any User class, regardless of what ORM or storage abstraction layer you are using. By default, Laravel includes a User class in the app Wheres Aggregates Raw Expressions Inserts Updates Deletes Unions Pessimistic Locking Eloquent ORM Introduction Basic Usage Mass Assignment Insert, Update, Delete Soft Deleting Timestamps Query0 码力 | 242 页 | 1.44 MB | 1 年前3Learning Laravel
2 Main Features 2 MVC 2 Blade Templating Engine 3 Routing & Middleware 3 Artisan 3 Eloquent ORM 3 Event Handling 3 Versions 3 Examples 4 Welcome to Laravel tag documentation! 4 Starter Guide commands to extend the Artisan command line tool. Eloquent ORM To connect your models to various types of databases, Laravel offers its own ORM with a large set of functions to work with. The framework ry-structure https://riptutorial.com/ 69 Chapter 21: Eloquent Introduction The Eloquent is an ORM (Object Relational Model) included with the Laravel. It implements the active record pattern and is0 码力 | 216 页 | 1.58 MB | 1 年前3Laravel 5.1 中文文档
org)提供 77 五、数据库 起步 1、简介 Laravel 让连接多种数据库和运行查询都变得非常简单,不论使用原生 SQL、还是查询构建 器,还是 Eloquent ORM。目前,Laravel 支持四种类型的数据库系统: MySQL Postgres SQLite SQL Server 1.1 配置 Laravel 让 1 读/写连接 有时候你希望使用一个数据库连接做查询,另一个数据库连接做插入、更新和删除,Laravel 使得这件事情轻而易举,不管你用的是原生 SQL,还是查询构建器,还是 Eloquent ORM, 合适的连接总是会被使用。 想要知道如何配置读/写连接,让我们看看下面这个例子: 'mysql' => [ 'read' => [ 'host' => '192 DB::rollBack(); 最后,你可以通过 commit 方法提交事务: DB::commit(); 注意:使用 DB 门面的事务方法还可以用于控制查询构建器和 Eloquent ORM 的事务。 本文档由 Laravel 学院(LaravelAcademy.org)提供 81 4、使用多个数据库连接 使用多个数据库连接的时候,可以使用 DB 门面的 connection0 码力 | 307 页 | 3.46 MB | 1 年前3Laravel 5.6 中文文档
return '0 码力 | 377 页 | 14.56 MB | 1 年前3Laravel 5.3 中文文档
.............................................................................. 458 11. Eloquent ORM .................................................................................................. RegisterController 的 validator 方法包含了新用户注册的验证规则,你可以按需要自定义该方 法。 RegisterController 的 create 方法负责使用 Eloquent ORM 在数据库中创建新的 App\User 记录。 当然,你也可以基于自己的需要自定义该方法。 获取认证用户 你可以通过 Auth 门面访问认证用户: $user = Auth::user(); getAuthIdentifier 方法返回用户“主键”,在后端 MySQL 中这将是自增 ID,getAuthPassword 返 回经哈希处理的用户密码,这个接口允许认证系统处理任何用户类,不管是你使用的是 ORM 还 是存储抽象层。默认情况下,Laravel app 目录下的 User 类实现了这个接口,所以你可以将这个 类作为实现例子。 7、事件 Laravel 支持在认证过程中触发多种事件,你可以在自己的0 码力 | 691 页 | 9.37 MB | 1 年前3《Slides Dev Web》 03. Laravel
pe=Repositories 7https://madewithlaravel.com/ 1 Principales fonctionnalités • Routes RESTful • ORM (Eloquent, implémentation du pattern Active Record) • Migrations • Moteur de templates (Blade) • Pagination Controller Architecture MVC • Structure d’une appli web = cycle Requête/Reponse9 • Modèle : Eloquent ORM • Vue : Blade Engine • Contrôleur : hérite de BaseController Pratique • Conventions de codage : Laravel0 码力 | 8 页 | 224.34 KB | 1 年前3The Laravel Handbook
app/Models/Dog.php : Notice the class inclues some classes under a “Eloquent” folder. Eloquent is an ORM (object-relational mapper), a tool that basically lets us interact with a database using a (PHP, in routing, and models, views and controllers interact to store and retrieve data through the Eloquent ORM. Let’s now move to other aspects of Laravel. 15. Dynamic routes We’ve seen how to create a route0 码力 | 111 页 | 14.25 MB | 1 年前3
共 11 条
- 1
- 2