PHPackages                             unisharp/laravel-pagerender - 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. unisharp/laravel-pagerender

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

unisharp/laravel-pagerender
===========================

Provide functions to render regular pages with parent-child relationships.

1.0.0(10y ago)487MITPHPPHP &gt;=5.5.0

Since Oct 13Pushed 10y ago5 watchersCompare

[ Source](https://github.com/UniSharp/laravel-pagerender)[ Packagist](https://packagist.org/packages/unisharp/laravel-pagerender)[ RSS](/packages/unisharp-laravel-pagerender/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Page Render Package for Laravel
===============================

[](#page-render-package-for-laravel)

- Find your page by alias(aboutus, service, and so on), forget about id.
- Support page with parent-child structure.
- Support custom view for different pages.
- Support breadcrumb(with ancestors function).

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

[](#installation)

1. install package

    ```
    composer require unisharp/laravel-pagerender
    ```
2. use the trait in your model

    ```
    use \Unisharp\Pagerender\PageRenderTrait;

    private $default_view = 'page.show';
    ```
3. make sure your table has these columns : `parent_id`, `alias`, `custom_view`

    ```
    public function up()
    {
        Schema::create('models', function(Blueprint $table)
        {
            // ...
            $table->string('alias');
            $table->integer('parent_id')->unsigned()->nullable();
            $table->string('custom_view', 128)->nullable();
            // ..
    ```

Usage
-----

[](#usage)

```
    $page = new Page();

    $page->render();
    // Generates the default view(or custom view if the column is not empty).

    $page->summary('content', 7);
    // Shorten words of a column, ex: The PHP...

    $page->getByAlias('aboutus');
    // Get the about us page.

    $page->hasByAlias('aboutus');
    // Check if the about us page exists.

    $page->allWithAlias();
    // Get pages that have alias.

    $page->subs;
    // Get children pages.

    $page->hasSubs();
    // Check if children pages exist.

    $page->parent;
    // Get parent page.

    $page->hasParent();
    // Check if parent page exists.

    $page->roots();
    // Get all pages at top level.

    $page->isRoot();
    // Check if this page is at top level.

    $page->getLevel();
    // Get level count(top level as 0).

    $page->ancestors();
    // Get all parent pages of the current page.
```

Todo
----

[](#todo)

```
    $page->tree();
    // Get all pages with parent-child structure.
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% 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

Unknown

Total

1

Last Release

3871d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/49773ea5050ec1d004a506cc1e11be08d6e87339120b5d223b8921e3f671153c?d=identicon)[g0110280](/maintainers/g0110280)

![](https://avatars.githubusercontent.com/u/181350?v=4)[Youchen Lee (isacl)](/maintainers/youchenlee)[@youchenlee](https://github.com/youchenlee)

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

---

Top Contributors

[![streamtw](https://avatars.githubusercontent.com/u/7333171?v=4)](https://github.com/streamtw "streamtw (14 commits)")[![youchenlee](https://avatars.githubusercontent.com/u/181350?v=4)](https://github.com/youchenlee "youchenlee (4 commits)")

---

Tags

laravelpagetreebreadcrumbrenderparentpagerender

### Embed Badge

![Health badge](/badges/unisharp-laravel-pagerender/health.svg)

```
[![Health](https://phpackages.com/badges/unisharp-laravel-pagerender/health.svg)](https://phpackages.com/packages/unisharp-laravel-pagerender)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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