PHPackages                             hi-folks/fusion - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. hi-folks/fusion

ActiveLibrary[Database &amp; ORM](/categories/database)

hi-folks/fusion
===============

Laravel package that enhances Eloquent models to facilitate the management of structured, database-free content through Markdown files with Frontmatter.

v1.1.0(8mo ago)37711MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Apr 6Pushed 8mo ago3 watchersCompare

[ Source](https://github.com/Hi-Folks/fusion)[ Packagist](https://packagist.org/packages/hi-folks/fusion)[ Docs](https://github.com/hi-folks/fusion)[ RSS](/packages/hi-folks-fusion/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (11)Versions (14)Used By (0)

 Fusion
========

[](#----fusion)

 [ ![Latest Version on Packagist](https://camo.githubusercontent.com/0e79b4efc199e150ac4c84aa2ba8a55ec218d66241e7b338a634c35764eb2321/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68692d666f6c6b732f667573696f6e2e7376673f7374796c653d666f722d7468652d6261646765) ](https://packagist.org/packages/hi-folks/fusion) [ ![Total Downloads](https://camo.githubusercontent.com/a035393ff8b6dc906764153e15ea4b2acf98aca7656b528ef88df757056137b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68692d666f6c6b732f667573696f6e2e7376673f7374796c653d666f722d7468652d6261646765) ](https://packagist.org/packages/hi-folks/fusion)
 [![Packagist License](https://camo.githubusercontent.com/6a3b00811fe31e25d74291218868086de1c0f12f8d4547c59fc9d8b318c984e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f68692d666f6c6b732f667573696f6e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/6a3b00811fe31e25d74291218868086de1c0f12f8d4547c59fc9d8b318c984e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f68692d666f6c6b732f667573696f6e3f7374796c653d666f722d7468652d6261646765) [![Packagist PHP Version Support](https://camo.githubusercontent.com/80bec412676456600a87fd2e71ae842b36afacf40014a71c8218fb776ea8ad62/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f68692d666f6c6b732f667573696f6e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/80bec412676456600a87fd2e71ae842b36afacf40014a71c8218fb776ea8ad62/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f68692d666f6c6b732f667573696f6e3f7374796c653d666f722d7468652d6261646765) [![GitHub last commit](https://camo.githubusercontent.com/61a89fbf62ff5b6a5e1af831bb710859b1fbc622321761af7060d8b6c4e442ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f68692d666f6c6b732f667573696f6e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/61a89fbf62ff5b6a5e1af831bb710859b1fbc622321761af7060d8b6c4e442ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f68692d666f6c6b732f667573696f6e3f7374796c653d666f722d7468652d6261646765)
 [![Tests](https://camo.githubusercontent.com/644eb3bb81e41add23ddb45e16ad061dbe0202fc0a1bf58c7969c3de94237512/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68692d666f6c6b732f667573696f6e2f6d61696e2e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d54657374)](https://camo.githubusercontent.com/644eb3bb81e41add23ddb45e16ad061dbe0202fc0a1bf58c7969c3de94237512/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68692d666f6c6b732f667573696f6e2f6d61696e2e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d54657374)

 *Fusion is a Laravel package designed to manage Markdown content via Eloquent Models, eliminating the necessity for a conventional database setup. It achieves this by leveraging Markdown files enhanced with Frontmatter.*

 [![Laravel package that enhances Eloquent models to facilitate the management of structured, database-free content through Markdown files with Frontmatter.](https://repository-images.githubusercontent.com/781827813/6cd3b16b-b318-4f90-8a03-77bbded91c02)](https://repository-images.githubusercontent.com/781827813/6cd3b16b-b318-4f90-8a03-77bbded91c02)

Fusion aids in **website development** by integrating the power of **Markdown and Frontmatter**, enabling developers to create content-driven Web sites without having to manage databases.

With Fusion, developers can leverage the simplicity of Markdown syntax combined with the flexibility of Frontmatter to seamlessly **organize and structure content**.

By parsing Frontmatter into **Eloquent models**, Fusion enables developers to create complex, structured websites with ease. Say goodbye to the complexities of database management and welcome simplified website development with Fusion.

Installation
------------

[](#installation)

You can install the package via the `composer` tool:

```
composer require hi-folks/fusion
```

Usage
-----

[](#usage)

Once you installed Fusion you can start the process of creating content in Markdown files and querying the files through the Models. For example, now we are going to create articles in Markdown format and we will parse and query them like you can do it with a database.

### Creating the content

[](#creating-the-content)

In the `resources/content` directory, you can create the `article` directory. In the `resources/content/article`, you can create your Markdown files with a frontmatter header like for example:

```
---
date: 2024-04-05
title: Example title for article 1
excerpt: This will be a short excerpt from article number 1.
published: true
---

# Article 1

Markdown goes here
```

you can name this file as `resources/content/article/article-1.md`You can create similarly the other Markdown files. These files represent your articles.

### Creating the Model

[](#creating-the-model)

Similarly, you are doing with a database, you can create your model for loading the markdown files. Because you are creating articles you can create your model as `app/Models/Article.php`.

You can fill the file in this way:

```
