PHPackages                             kosmosx/frontend - 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. kosmosx/frontend

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

kosmosx/frontend
================

Frontend manager for resources and metatag

1.0.0(6y ago)7411MITPHPPHP &gt;=7.1.3

Since May 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/KosmosX/frontend)[ Packagist](https://packagist.org/packages/kosmosx/frontend)[ RSS](/packages/kosmosx-frontend/feed)WikiDiscussions master Synced 2w ago

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

Front Manager package
=====================

[](#front-manager-package)

[![](https://camo.githubusercontent.com/093902439ff11427de7fe252d55fd80c588fba59b931fa416ddc5c0a211456b8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e312d677265656e2e737667)](https://camo.githubusercontent.com/093902439ff11427de7fe252d55fd80c588fba59b931fa416ddc5c0a211456b8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e312d677265656e2e737667)[![](https://camo.githubusercontent.com/a5c92d30e146de67828b382fad1883d00e19814922c2d96d3260057858d7ccf0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d372e312e332d626c75652e737667)](https://camo.githubusercontent.com/a5c92d30e146de67828b382fad1883d00e19814922c2d96d3260057858d7ccf0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d372e312e332d626c75652e737667)[![](https://camo.githubusercontent.com/0903c50c5384d4b0b1bb70b45087daac5f3313c0769807a34a9fc24ee130b946/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d2533453d352e362d626c75652e737667)](https://camo.githubusercontent.com/0903c50c5384d4b0b1bb70b45087daac5f3313c0769807a34a9fc24ee130b946/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d2533453d352e362d626c75652e737667)[![](https://camo.githubusercontent.com/c2245bb14f596505401328a58e17380834c38cce973dbee72593673f79fa8b5f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c756d656e2d2533453d352e362d626c75652e737667)](https://camo.githubusercontent.com/c2245bb14f596505401328a58e17380834c38cce973dbee72593673f79fa8b5f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c756d656e2d2533453d352e362d626c75652e737667)

*Frontend manager for: Js, CSS, Metatag, Open Graph. You can add and load resources with simple function.*

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

[](#installation)

Install with console command

```
composer require kosmosx/frontend

```

Or add in composore.json one of:

```
"kosmosx/frontend": "~1" // version >=1.0.0 =1.0.0  array(
    ...
    'Kosmosx\Frontend\Providers\Kosmosx\FrontendServiceProvider',
),

```

Register provider in bootstrap file (if Lumen)

```
$app->register(Kosmosx\Frontend\Providers\FrontManagerServiceProvider);

$app->withFacades(); //uncomment if you want to use the Facades of the package

```

Let's go
--------

[](#lets-go)

**Basic usage**

```
$resources = (new FrontendFactory())->scripts();
or
$resources = new ScriptsFrontend();

$resources->add('https://code.jquery.com/jquery-3.3.1.min.js', array(),'head.jquery')
    ->add('https://example.com', array("type"=>"script"),'footer');

```

> **'head.jquery'**: **head** it is the context where the resource should be loaded inside the DOM (if omitted, body is used by default); **jquery** is the name of resource (not reuqired) Render tags

```
$resources->dump() //render all script tags

//output:

```

**All method of FrontendInvoker**

```
$resources->add(...)        //push in resources new element
          ->dump(...)       //render resources element
          ->has(...)        //find element in resources
          ->forget(...)     //forget element in resources
          ->toArray(...)

```

**Function of services(Resource and Metatag)**

```
->exist($resource, $context, $name) //$resource (script, js, og, meta etc..)
                                  //$context (body,footer etc..) if metatag service only 'head'
                                  //$name (name of resources) if metatag service name of type

->delete($resource, $context, $name)
->toArray()
->toString()
->getContext()
->setContext()                    //add extra context to default
->cleanText()                     //clean string (remove tag and special charter)

```

**Example**

```
$openGraph = new OpenGraphFrontend();                       //create with Service
$openGraph = new FrontendInvoker(new OpenGraphFrontend());  //create with invoker that use command
$openGraph = (new FrontendFactory())->opengraph();          //create with Factory that use invoker

$openGraph->add('title', 'Resources Manager')->add('description', 'Og description');

return $openGraph->dump();
//output:

return $openGraph->dump('og:title');
//output:

```

### Support

[](#support)

The pull requests will be reviewed (document the code or write a detailed comment) and if successful they will be accepted

Write to  or create an issue.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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

Unknown

Total

1

Last Release

2502d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/86b56131c92d8421d2a54614993c2bf00e91b1265de5b88948fd90d00b986d7e?d=identicon)[Fabrizio Cafolla](/maintainers/Fabrizio%20Cafolla)

---

Top Contributors

[![FabrizioCafolla](https://avatars.githubusercontent.com/u/13237032?v=4)](https://github.com/FabrizioCafolla "FabrizioCafolla (10 commits)")

---

Tags

appletcsshtml-css-javascriptjavscriptlaravellaravel-packagelumenlumen-packagemetatagsopen-graphresourcesresponse-codephplaravellumenfrontendresourcesmetatagsopengraph

### Embed Badge

![Health badge](/badges/kosmosx-frontend/health.svg)

```
[![Health](https://phpackages.com/badges/kosmosx-frontend/health.svg)](https://phpackages.com/packages/kosmosx-frontend)
```

###  Alternatives

[artesaos/seotools

SEO Tools for Laravel and Lumen

3.4k5.3M63](/packages/artesaos-seotools)[butschster/meta-tags

The most powerful and extendable tools for managing SEO Meta Tags in your Laravel project

631768.2k3](/packages/butschster-meta-tags)[kra8/laravel-snowflake

Snowflake for Laravel and Lumen.

188434.9k8](/packages/kra8-laravel-snowflake)[rumenx/php-assets

Framework-agnostic PHP package to manage frontend assets in the backend. Works with plain PHP, Laravel, Symfony, and any PHP framework.

1043.3k](/packages/rumenx-php-assets)

PHPackages © 2026

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