PHPackages                             anlutro/l4-controller - 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. [Framework](/categories/framework)
4. /
5. anlutro/l4-controller

ActiveLibrary[Framework](/categories/framework)

anlutro/l4-controller
=====================

Base Laravel controller classes.

0.3.6(10y ago)51.2k2MITPHPPHP &gt;=5.4.0

Since Jan 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/anlutro/laravel-controller)[ Packagist](https://packagist.org/packages/anlutro/l4-controller)[ RSS](/packages/anlutro-l4-controller/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (24)Used By (2)

Laravel 4 Controller [![Build Status](https://camo.githubusercontent.com/3a9537f44e874efcd12d46b3c3035b921c0b3d7377f9dd90adc80455f401794f/68747470733a2f2f7472617669732d63692e6f72672f616e6c7574726f2f6c61726176656c2d636f6e74726f6c6c65722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/anlutro/laravel-controller) [![Latest Version](https://camo.githubusercontent.com/b1e4653876b7915f5adc456567a0615621b72ff24d165939aae632501769da09/687474703a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f616e6c7574726f2f6c61726176656c2d636f6e74726f6c6c65722e737667)](https://github.com/anlutro/laravel-controller/releases)
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#laravel-4-controller--)

Installation: `composer require anlutro/l4-controller`

Pick the latest stable version from packagist or the GitHub tag list.

WARNING: Backwards compatibility is not guaranteed during version 0.x.

### Controller

[](#controller)

`protected function url($action, $params = array())`

This is a shorthand for `URL::action` with a twist - if no controller is given, it defaults to the current controller. For example, if you call `url('index')` from `MyController`, it will return `URL::action('MyController@index')`.

`protected function redirect($action, $params = array())`

Same as above, but for redirects.

### API Controller

[](#api-controller)

Provides some standardized responses when there's no real data to return.

`protected function success($messages = null)`

Returns a generic 200 response with optional messages.

`protected function error($errors)`

Returns a generic 400 response with the errors given. Will work with validators, message bags and arrays.

`protected function notFound($messages = null)`

Returns a generic 404 response with optional messages.

Contact
-------

[](#contact)

Open an issue on GitHub if you have any problems or suggestions.

License
-------

[](#license)

The contents of this repository is released under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

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

Recently: every ~122 days

Total

22

Last Release

3907d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48f62855097c02888b96494da9a389988cd7ecb9001465f8ec30f15672fb5b5a?d=identicon)[anlutro](/maintainers/anlutro)

---

Top Contributors

[![anlutro](https://avatars.githubusercontent.com/u/163093?v=4)](https://github.com/anlutro "anlutro (38 commits)")

### Embed Badge

![Health badge](/badges/anlutro-l4-controller/health.svg)

```
[![Health](https://phpackages.com/badges/anlutro-l4-controller/health.svg)](https://phpackages.com/packages/anlutro-l4-controller)
```

###  Alternatives

[livewire/livewire

A front-end framework for Laravel.

23.5k75.5M1.8k](/packages/livewire-livewire)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.4k10.6M274](/packages/laravel-boost)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/wayfinder

Generate TypeScript representations of your Laravel actions and routes.

1.7k4.1M69](/packages/laravel-wayfinder)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)

PHPackages © 2026

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