PHPackages                             lbausch/laravel-cornerstone - 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. lbausch/laravel-cornerstone

ActiveLibrary

lbausch/laravel-cornerstone
===========================

Some helper functions for Laravel

v5.2.0(8y ago)21.4kMITPHP

Since May 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/lbausch/cornerstone-for-lavel)[ Packagist](https://packagist.org/packages/lbausch/laravel-cornerstone)[ RSS](/packages/lbausch-laravel-cornerstone/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (22)Used By (0)

Laravel Cornerstone
===================

[](#laravel-cornerstone)

[![Build Status](https://camo.githubusercontent.com/7ba24c0738dda7daf02163250b8408bcdb8439166d5c5ccfa74f57de16ffc4f8/68747470733a2f2f7472617669732d63692e6f72672f6c6261757363682f6c61726176656c2d636f726e657273746f6e652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lbausch/laravel-cornerstone)

Some helper functions for Laravel

Documentation
-------------

[](#documentation)

### Helper functions

[](#helper-functions)

#### alert

[](#alert)

Create a simple alert message.

`function alert($type, $message)`

`$type` can be one of `info`, `warning`, `error` or `success`. Requires Twitter Bootstrap to be displayed correctly.

Example usage: `alert('error', 'This didn\'t work');`

#### is\_active

[](#is_active)

Checks if current request matches certain controllers and returns the string `active` if so. Useful for highlighting corresponding navigation items.

`function is_active($needles, $css_classes = ['active'])`

Example usage: `is_active('SomeController')` or `is_active(['SomeController', 'OtherController'])`. You may also specify the css classes to return with `$css_classes`.

#### link\_back

[](#link_back)

Renders a back link. Takes an optional link or tries to use JavaScript.

`function link_back($target = null)`

Example usage: `link_back()` or `link_back(action('SomeController@someMethod'))`

#### redact

[](#redact)

For use in controller methods. Replaces the `redirect(action('SomeController@someMethod'))` construct.

`function redact($name, $parameters = array(), $status = 302, $headers = array(), $secure = null)`

Added bonus: Use `_self` to refer to the Controller the function is called in. For example: `return redact('_self@index');`.

### Repositories

[](#repositories)

#### BaseRepositoryInterface

[](#baserepositoryinterface)

An interface for Repositories. See `src/Repositories/BaseRepositoryInterface.php` for methods you need to implement.

#### EloquentAbstractRepository

[](#eloquentabstractrepository)

Abstract implementation for Eloquent of the above interface. Provides default implementation to extend on. See `src/Repositories/EloquentAbstractRepository.php` for actual implementation.

### Keep alive

[](#keep-alive)

Prevent the CSRF token from timing out. Simple send an AJAX GET request every 5 minutes to the route `lbausch/laravel-cornerstone/keepalive`. Of course this is only necessary on pages which contain a `_token` field. To achieve this with jQuery use the following snippet:

```
if ($('input[name=_token]').length > 0) {
    setInterval(function () {
        $.get('lbausch/laravel-cornerstone/keepalive');
    }, 3e5);
}
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity72

Established project with proven stability

 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 ~43 days

Recently: every ~92 days

Total

20

Last Release

3181d ago

Major Versions

v1.3.1 → v2.0.02015-12-30

v2.2.1 → v3.0.02016-03-18

v3.0.2 → v4.0.02016-09-07

v4.0.0 → v5.0.02017-01-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2e0b76aaa55ea4695fe4702b35ab11a4db66d16676a25ba158200e8e8365475?d=identicon)[lbausch](/maintainers/lbausch)

---

Top Contributors

[![lbausch](https://avatars.githubusercontent.com/u/5747127?v=4)](https://github.com/lbausch "lbausch (59 commits)")

---

Tags

laravelpackagephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lbausch-laravel-cornerstone/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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