From 092f8473cef58ab67d6287194ebadebdd3a46498 Mon Sep 17 00:00:00 2001 From: Christopher L Bray Date: Tue, 24 Sep 2013 10:37:37 +0100 Subject: [PATCH] Add Syntax Highlighting Personally, I think syntax highlighting makes the code in this README easier to read. Maybe you agree, maybe you don't, thought I'd suggest it anyway. --- src/Illuminate/Database/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Database/README.md b/src/Illuminate/Database/README.md index 628e577853e0..5009fc098fd5 100755 --- a/src/Illuminate/Database/README.md +++ b/src/Illuminate/Database/README.md @@ -6,7 +6,7 @@ The Illuminate Database component is a full database toolkit for PHP, providing First, create a new "Capsule" manager instance. Capsule aims to make configuring the library for usage outside of the Laravel framework as easy as possible. -``` +```PHP use Illuminate\Database\Capsule\Manager as Capsule; $capsule = new Capsule; @@ -41,17 +41,17 @@ Once the Capsule instance has been registered. You may use it like so: **Using The Query Builder** -``` +```PHP $users = Capsule::table('users')->where('votes', '>', 100)->get(); ``` Other core methods may be accessed directly from the Capsule in the same manner as from the DB facade: -``` +```PHP $results = Capsule::select('select * from users where id = ?', array(1)); ``` **Using The Schema Builder** -``` +```PHP Capsule::schema()->create('users', function($table) { $table->increments('id'); @@ -62,7 +62,7 @@ Capsule::schema()->create('users', function($table) **Using The Eloquent ORM** -``` +```PHP class User extends Illuminate\Database\Eloquent\Model {} $users = User::where('votes', '>', 1)->get();