Skip to content

Commit 64e2c08

Browse files
committed
Update readme
1 parent 10c3210 commit 64e2c08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ In `index.blade.php` a collection of post-objects is available via the `$posts`-
7676

7777
Pagination-links are also available:
7878

79-
```
79+
``` php
8080
{{ $posts->links() }}
8181
```
8282

@@ -93,7 +93,7 @@ The Post-object contains all your front matter attributes as well as `slug`, `da
9393

9494
You can retrieve posts and filter them as a collection anywhere in your application using the Post-model:
9595

96-
```
96+
``` php
9797
use Olssonm\Ampersand\Models\Post;
9898

9999
// Reject posts where is_draft is true or has a date in the future
@@ -104,7 +104,7 @@ $posts = Post::all()->reject(function($item) {
104104

105105
The posts are sorted by descending date per default, so to get the latest post:
106106

107-
```
107+
``` php
108108
// Get first post
109109
$post = Post::all()->first();
110110
```
@@ -126,7 +126,7 @@ The package routes are `ampersand.index` and `ampersand.show`:
126126

127127
#### Defining your own routes
128128

129-
The default routes are registered withing the ampersand-name and the default web-middleware group.
129+
The default routes are registered with the ampersand-name and the default web-middleware group.
130130

131131
If you by any reason want to override this (for example if you want to have your articles behind a login or maybe you don't use the standard web-middleware group), you may set `register_routes` to `false` in ampersand.php, and then register them yourself:
132132

0 commit comments

Comments
 (0)