PHPackages                             esanj/public-pages - 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. esanj/public-pages

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

esanj/public-pages
==================

Public pages for Laravel apps including home and error pages.

v0.0.8(3w ago)0109MITPHPPHP ^8.2|^8.3|^8.4

Since Jun 11Pushed 3w agoCompare

[ Source](https://github.com/eSanjDev/ms-package-public-pages)[ Packagist](https://packagist.org/packages/esanj/public-pages)[ RSS](/packages/esanj-public-pages/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (9)Used By (0)

🛠️ Esanj Public Pages for Laravel
=================================

[](#️-esanj-public-pages-for-laravel)

`esanj/public-pages` is a Laravel package that gives your application a clean, ready-to-use **home page** and a complete set of **HTTP error pages** (400, 401, 403, 404, 419, 429, 500, 502, 503, 504), with bundled assets (CSS, background image), built-in **English &amp; Persian translations**, and full control through a simple config file.

Everything works out of the box. You only publish files when you want to customize them.

---

✨ Features
----------

[](#-features)

- ✅ Pre-designed error pages for the 10 most common HTTP status codes
- 🏠 Optional, configurable home page route
- 📁 Bundled front-end assets (CSS + background image)
- 🌐 Multi-language support (English &amp; Persian included, RTL-aware)
- 🎨 Fully customizable — publish and override views, assets, config &amp; translations
- ⚡ Zero configuration required to get started

---

📋 Requirements
--------------

[](#-requirements)

RequirementVersionPHP`8.2`, `8.3` or `8.4`Laravel`12.x` or `13.x`---

📦 Installation
--------------

[](#-installation)

**1. Install via Composer:**

```
composer require esanj/public-pages
```

That's it — the package auto-registers itself. The home page and error pages are **already active**.

**2. (Optional) Publish files you want to customize:**

```
php artisan publicpages:install
```

With no options, this publishes **everything** (views, assets, translations, and config). See [Commands](#-commands) to publish only what you need.

---

🗂️ What Gets Published
----------------------

[](#️-what-gets-published)

WhatPublished toHome view`resources/views/vendor/publicpages/home.blade.php`Error views`resources/views/errors/`Assets`public/assets/vendor/public-pages/`Translations`lang/{locale}/publicpages.php`Config`config/esanj/public_pages.php`File tree after a full install:

```
resources/
└── views/
    ├── vendor/publicpages/
    │   └── home.blade.php
    └── errors/
        ├── layout.blade.php
        ├── 404.blade.php
        ├── 500.blade.php
        └── ...
public/
└── assets/vendor/public-pages/
    ├── style.css
    └── background.png
lang/
├── en/publicpages.php
└── fa/publicpages.php
config/
└── esanj/public_pages.php

```

---

🧩 Commands
----------

[](#-commands)

CommandWhat it does`php artisan publicpages:install`Publishes **everything** (views, assets, lang, config)`php artisan publicpages:publish-views`Publishes views **and** assets`php artisan publicpages:publish-lang`Publishes translation files`php artisan publicpages:publish-config`Publishes the config file`publicpages:install` also accepts flags to publish only part of the package:

```
php artisan publicpages:install --views     # views only
php artisan publicpages:install --assets    # assets only
php artisan publicpages:install --lang      # translations only
php artisan publicpages:install --config    # config only
php artisan publicpages:install --all       # everything (same as no flag)
```

> ℹ️ `publicpages:install` **always overwrites** existing files, so you can re-run it any time to pull in updates.

You can also publish directly with Laravel's `vendor:publish` using the package tags:

TagIncludes`esanj-public-pages-views`🎨 Views`esanj-public-pages-assets`🧩 Public assets`esanj-public-pages-lang`🌐 Translations`esanj-public-pages-config`⚙️ Config```
php artisan vendor:publish --tag=esanj-public-pages-views
```

---

⚙️ Configuration
----------------

[](#️-configuration)

Publish the config file:

```
php artisan publicpages:publish-config
```

This creates `config/esanj/public_pages.php`. The full default config:

```
