PHPackages                             websight/l5-polyfaq - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. websight/l5-polyfaq

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

websight/l5-polyfaq
===================

Simple Laravel 5 FAQs for your site wired with polymorphic relations

0.1.0(10y ago)0138MITPHP

Since Dec 8Pushed 10y ago2 watchersCompare

[ Source](https://github.com/websightgmbh/l5-polyfaq)[ Packagist](https://packagist.org/packages/websight/l5-polyfaq)[ Docs](https://github.com/websightgmbh/l5-polyfaq)[ RSS](/packages/websight-l5-polyfaq/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

PolyFAQ - Simple FAQ Provider for your Laravel 5 Application
============================================================

[](#polyfaq---simple-faq-provider-for-your-laravel-5-application)

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

[](#installation)

Install with composer.

```
composer require websight/l5-polyfaq
```

Add the ServiceProvider to your `app/config/app.php`

```
Websight\Polyfaq\PolyfaqServiceProvider::class,
```

Install the config.

```
php artisan vendor:publish --provider="Websight\Polyfaq\PolyfaqServiceProvider" --tag="config"

```

Install the migrations.

```
php artisan vendor:publish --provider="Websight\Polyfaq\PolyfaqServiceProvider" --tag="migrations"

```

Run the migrations.

```
php artisan migrate

```

Usage
-----

[](#usage)

There's basically three ways to use this package with your own model classes.

### 1. Include a trait

[](#1-include-a-trait)

This is the easiest solution. Simply `use` the trait.

```
use Websight\Polyfaq\FaqTrait;

class MyModel extends Model {

    use FaqTrait;

}
```

That way, you can use `$model->faqs` to retrieve the collection of associated FAQs.

### 2. Make your own Polymorphic relation

[](#2-make-your-own-polymorphic-relation)

If you don't like the field name `faqs`, you can also mix your own [polymorphic relationship](http://laravel.com/docs/5.1/eloquent-relationships#polymorphic-relations)

```
class MyModel extends Model {

    /**
     * @return \Illuminate\Database\Eloquent\Relations\MorphMany
     */
    public function coolfaqs()
    {
        return $this->morphMany('Websight\Polyfaq\Faq', 'faqable');
    }

}
```

That way, you would access them through `$model->coolfaqs`.

### 3. Use a many to many relationship

[](#3-use-a-many-to-many-relationship)

*to be done*

Customization
-------------

[](#customization)

You can make this package your own.

### Views

[](#views)

The views of this package are referenced via `polyfaq::` prefix, described in the [documentation](http://laravel.com/docs/5.1/packages#views).

If you need to override a template, you will need to place it in `resources/views/vendor/polyfaq/$templatename.blade.php`.

### Language strings

[](#language-strings)

The language files of this package are also referenced with the `polyfaq::` prefix.

You can publish the translations as well, if you need to.

```
php artisan vendor:publish --provider="Websight\Polyfaq\PolyfaqServiceProvider" --tag="translations"

```

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2015

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Total

2

Last Release

3824d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ac8297e12671d91305ec01ab56add8cb141fa82d678ba96f0012eeb7f88ea0c?d=identicon)[cedricziel](/maintainers/cedricziel)

![](https://avatars.githubusercontent.com/u/5716791?v=4)[tilman82](/maintainers/tilman82)[@tilman82](https://github.com/tilman82)

---

Top Contributors

[![cedricziel](https://avatars.githubusercontent.com/u/418970?v=4)](https://github.com/cedricziel "cedricziel (6 commits)")

---

Tags

laravellaravel5FAQ

### Embed Badge

![Health badge](/badges/websight-l5-polyfaq/health.svg)

```
[![Health](https://phpackages.com/badges/websight-l5-polyfaq/health.svg)](https://phpackages.com/packages/websight-l5-polyfaq)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[wearepixel/laravel-cart

A cart implementation for Laravel

1355.6k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
