syntax highlighting: take 3.
This commit is contained in:
14
readme.md
14
readme.md
@@ -7,6 +7,8 @@ Laravel is a clean and classy framework for PHP web development. Freeing you fro
|
|||||||
Stay true to the web with RESTful routing:
|
Stay true to the web with RESTful routing:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
<?php
|
||||||
|
|
||||||
'GET /' => function()
|
'GET /' => function()
|
||||||
{
|
{
|
||||||
return View::make('home/index');
|
return View::make('home/index');
|
||||||
@@ -16,25 +18,19 @@ Stay true to the web with RESTful routing:
|
|||||||
Redirect to a named route and flash something to the session:
|
Redirect to a named route and flash something to the session:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php return Redirect::to_profile()->with('message', 'Welcome Back!');
|
||||||
|
|
||||||
return Redirect::to_profile()->with('message', 'Welcome Back!');
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Retrieve a blog post and eagerly load the comments using Eloquent ORM:
|
Retrieve a blog post and eagerly load the comments using Eloquent ORM:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php $posts = Post::with('comments')->find(1);
|
||||||
|
|
||||||
$posts = Post::with('comments')->find(1);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Get input from the previous request to re-populate a form:
|
Get input from the previous request to re-populate a form:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php echo Input::old('email');
|
||||||
|
|
||||||
echo Input::old('email');
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Ready To Learn More?
|
### Ready To Learn More?
|
||||||
|
|||||||
Reference in New Issue
Block a user