Skip to content

Commit 52ab0a1

Browse files
committed
Improve collections documentation
1 parent e4dcb81 commit 52ab0a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/digging-deeper/collections.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ navigation:
88

99
## Introduction to Hyde Data Collections
1010

11-
Hyde provides `DataCollections`, a subset of [Laravel Collections](https://laravel.com/docs/10.x/collections) giving you
12-
a similar developer experience to working with Eloquent Collections. However, instead of accessing a database,
13-
it's all entirely file-based using static data files such as Markdown, Yaml, and JSON files which get
11+
Hyde provides `DataCollections`, a subset of [Laravel Collections](https://laravel.com/docs/10.x/collections) giving you a similar developer experience to working with Eloquent Collections.
12+
However, instead of accessing a database, it's all entirely file-based using static data files such as Markdown, Yaml, and JSON files which get
1413
parsed into objects that you can easily work with.
1514

16-
As you have access to all standard Laravel Collection methods, you are encouraged to read the
17-
[Laravel Collections documentation](https://laravel.com/docs/10.x/collections) for more information.
15+
As you have access to all standard Laravel Collection methods, you are encouraged to read the [Laravel Collections documentation](https://laravel.com/docs/10.x/collections) for more information.
1816

1917
This article covers advanced usage intended for those who are writing their own Blade views, and is not required as Hyde comes pre-packaged with many templates for you to use.
2018

2119

2220
## High-Level Concept Overview
2321

22+
In short, HydePHP finds files in the specified directory, turns each file into an object, and returns a Laravel Collection of these objects.
23+
2424
To make collections easy to use and understand, Hyde makes a few assumptions about the structure of your collections.
2525
Follow these conventions and creating dynamic static sites will be a breeze.
2626

@@ -29,7 +29,7 @@ Follow these conventions and creating dynamic static sites will be a breeze.
2929
3. To get a collection, specify name of the subdirectory the files are stored in.
3030
4. Data will be parsed into differing objects depending on which facade method you use. See the table below.
3131
5. The class is aliased so that you can use it in Blade files without having to include the namespace.
32-
6. While not enforced, each subdirectory should probably only have the same filetype to prevent developer confusion
32+
6. While not enforced, each subdirectory should probably only have the same filetype to prevent developer confusion.
3333
7. Unlike source files for pages, files starting with underscores are not ignored.
3434
8. You can customize the source directory for collections through a service provider.
3535
9. If the base source directory does not exist, it will be created for you.

0 commit comments

Comments
 (0)