PHPackages                             samanix/laranix - 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. samanix/laranix

ActiveLibrary[Framework](/categories/framework)

samanix/laranix
===============

Laravel extended functionality

4.0.8(8y ago)22821MITPHPPHP ~7.1.0

Since Jul 7Pushed 8y agoCompare

[ Source](https://github.com/samanix/laranix)[ Packagist](https://packagist.org/packages/samanix/laranix)[ Docs](https://samanix.com)[ RSS](/packages/samanix-laranix/feed)WikiDiscussions 4.0 Synced 3w ago

READMEChangelogDependencies (9)Versions (38)Used By (1)

Laranix
=======

[](#laranix)

[![Build Status](https://camo.githubusercontent.com/41bba7408227a0afeb94032b1b4fcb36f09277d0c8ae2a7e6db8bbd1be397509/68747470733a2f2f7472617669732d63692e6f72672f73616d616e69782f6c6172616e69782e737667)](https://travis-ci.org/samanix/laranix)

About
-----

[](#about)

[Laranix](https://samanix.com/laranix) by [Samanix](https://samanix.com)

Laranix provides extended functionality and more feature rich existing functions to Laravel.

It was done as a package, albeit a large one, so that it is more easily updated with new Laravel versions.

### Contributions

[](#contributions)

Please use the [issue tracker](https://bitbucket.org/samanix-php/laranix/issues) to report any issues, or submit via [pull requests](https://bitbucket.org/samanix-php/laranix/pull-requests/)

Contributions are encouraged via [pull requests](https://bitbucket.org/samanix-php/laranix/pull-requests/)

### Security

[](#security)

For security related issues, please contact .

### License

[](#license)

Laranix is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

### Requirements

[](#requirements)

- PHP 7.1+
- [laravel/framework](https://github.com/laravel/framework) 5.5.\*
- [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) ~6.0
- [andreasindal/laravel-markdown](https://github.com/andreasindal/laravel-markdown) ~2.0

Features
--------

[](#features)

### AntiSpam

[](#antispam)

Provides invisible recaptcha entry on forms (sign up with Google), as well as a sequence ID field, which will prevent the form being submitted twice.

### Auth

[](#auth)

Custom auth package built on top of Laravels own, providing:

- More feature rich User model
- User groups with group flags (permissions)
- Password resets
- Email verification
- User cages - protect an area so a user cannot access it

### Foundation

[](#foundation)

Provides base packages and configs for your app.

### Installer

[](#installer)

Installs, publishes and copies files for Laranix to your app.

### Session

[](#session)

Adds IP locking to sessions, not required if you don't want to use it.

### Support

[](#support)

Adds extra functionality, including:

- Simple URL creator, that will always (try) and use the full URL - if it doesn't, somethings wrong with your setup
- String formatting with named parameters (similar to C#)
- Settings class, that allows you to use a class to determine parameters and their types

### Themer

[](#themer)

Provides themes and loads the files given, combines like for like files in to one automatically and updates if any file is added or changed

### Tracker

[](#tracker)

Provides breadcrumb like tracking for user actions

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

[](#installation)

### Composer

[](#composer)

`composer require samanix\laranix`

Or add `"samanix\laranix": "~2.0"` to your composer.json and then run `composer update`.

### Service Providers

[](#service-providers)

Services are automatically registered since Laravel 5.5 using package discovery in the `composer.json`.

However, in the `config/app.php` you may still wish to comment out or remove:

```
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,

```

There are a number of other packages provided with the dev install of Laranix, see the documentation for them for help:

```
barryvdh/laravel-debugbar
barryvdh/laravel-ide-helper
laravel/dusk

```

### Optional: Register Facades

[](#optional-register-facades)

Registered automatically since Laravel 5.5.

### Artisan Commands

[](#artisan-commands)

Registered automatically since Laravel 5.5.

However, before running any commands for Laranix:

- Make sure to remove the default Laravel user and password migrations from 'database/migrations/'
- You can also remove from the relevant app folders:
    - Any default Laravel controllers
    - Any default Laravel views
    - Any default Laravel models
    - Any files/folders in resources/assets provided by default by Laravel
- It is recommended to run `php artisan preset none` as well, although this is not required

Run `php artisan laranix:install -AO`.

See `php artisan laranix:install --help` for options.

The following commands are also run automatically if the required option is set:

```
php artisan vendor:publish --tag=laranix-configs
php artisan vendor:publish --tag=laranix-migrations
php artisan vendor:publish --tag=laravel-mail
php artisan vendor:publish --provider="Indal\Markdown\MarkdownServiceProvider"

```

If you skip these commands, you can run the artisan ones at a later time.

**The command also attempts to run `composer dump-autoload`, if you get an error about this, please ensure you run manually afterwards.**

#### Theme Commands

[](#theme-commands)

The basic theme for Laranix is copied to the `resources/themes` directory, you can either setup your compilers and/or copy the files to the `public\themes` directory, or you can use the command to symlink.

```
php artisan laranix:themer:link {theme} {images|styles|scripts}

```

Where the first argument is the theme key, and the 2nd corresponds to the folder required.

### Controller

[](#controller)

Laranix runs its own base controller, you can extend this class in your own controllers, or roll your own entirely, if you do either of these, remember to update the controllers installed by Laranix.

The Laranix base controller resides in `\Laranix\Foundation\Controllers\Controller`.

The base controller contains methods and traits that can be called that will scaffold certain scenarios.

#### Error Controller

[](#error-controller)

Laranix provides a special error controller in `App\Http\Controllers\Errors`. This overrides certain parts of the foundation controller that allows the `Themer` to load, and display custom error pages using your global styles and scripts (as certain parts such as `Themer` are only autoloaded on get requests).

In order to use this, open `app/Exceptions/Handler.php` and add the following to the `render` method, above the current render statement:

```
$response = $this->container->make(App::class)->renderClientError($exception);

if ($response !== null) {
    return new Response($response, $exception->getStatusCode(), $exception->getHeaders());
}

```

### Routes

[](#routes)

There are some routes provided for authentication as well as an entry page, you are free to change these.

**When running `laranix:install`, the `web.php` routes file is overwritten entirely with Laranix routes. Take a backup first if required.**

*It is only overwritten if the `-O|overwrite` parameter is set.*

### Events

[](#events)

Add the following to your `app/Providers/EventServiceProvider.php` inside the `$listen` array:

```
\Laranix\Auth\Email\Events\Updated::class => [
    \Laranix\Auth\Email\Listeners\Updated::class,
],
\Illuminate\Auth\Events\Logout::class => [
    \Laranix\Auth\Listeners\Logout::class,
],
\Illuminate\Auth\Events\Registered::class => [
    \Laranix\Auth\Listeners\Registered::class,
],
\Laranix\Auth\Password\Events\Updated::class => [
    \Laranix\Auth\Password\Listeners\Updated::class,
],

```

Add the following to your `App\Providers\EventServiceProvider.php` inside the `$subscribe` array (create if it does not exist):

```
\Laranix\Auth\Email\Verification\Events\Subscriber::class,
\Laranix\Auth\Events\Login\Subscriber::class,
\Laranix\Auth\Group\Events\Subscriber::class,
\Laranix\Auth\Password\Reset\Events\Subscriber::class,
\Laranix\Auth\User\Cage\Events\Subscriber::class,
\Laranix\Auth\User\Events\Subscriber::class,
\Laranix\Auth\User\Groups\Events\Subscriber::class,

```

***You can always register your own listeners as well as or instead of the default provided.***

### Middleware

[](#middleware)

Open `app/Http/Kernel.php` and add the following to `$routeMiddleware`:

```
'antispam'  => \Laranix\AntiSpam\Middleware\Verify::class,

```

Then, add `\Laranix\Tracker\Middleware\Flush::class` to the `$middleware` array.

### Configure

[](#configure)

Open the `config\auth.php` and edit the `providers` array, add:

```
'laranixuser' => [
     'driver'   => 'eloquent',
     'model'    => \Laranix\Auth\User\User::class,
],

```

Then change the `guards.web.provider` value to `laranixuser`.

You may also wish to change the `guards.api.provider` to `laranixuser` too.

Next, open the `config\mail.php` and change the `markdown.theme` to `laranix`.

#### .env Files

[](#env-files)

Add/edit the following settings to your `.env`:

```
APP_VERSION=your-app-version
RECAPTCHA_KEY=site-key
RECAPTCHA_SECRET=secret-key
SESSION_DRIVER=laranix

```

#### Other Config files

[](#other-config-files)

Other configurations you can edit are:

***laranixauth.php***

Configures Auth components.

***themer.php***

Configures Themer component.

***appsettings.php***

Provides some extra custom settings for your app.

***globalviewvars.php***

Add variables that will be shared globally to **all** views.

***themerdefaultfiles.php***

Add files that Themer will load on all requests where Themer is initialised.

***socialmedia.php***

Provides links to various social media outlets, you are free to add your own.

***defaultusergroups.php***

Add and configure default user groups for when the database is seeded.

***antispam.php***

Configures AntiSpam components.

***tracker.php***

Configures Tracker component.

##### Other Packages

[](#other-packages)

***markdown.php***

Remember to set `escape_markup` to `true` in this file if you are allowing user input.

### Database

[](#database)

Run migrations using the `php artisan migrate` command.

Seed your database with your default user groups using `php artisan db:seed --class=DefaultGroups` if Laranix has been installed with the `--D|seeds` option.

Artisan Commands
----------------

[](#artisan-commands-1)

In addition to the `laranix:install` command, Laranix also provides some other commands.

> Remember to run `php artisan  --help` for options and information.

`laranix:themer:link`Links the image directory to the public theme image directory for the given theme.

`laranix:themer:clear`Clears compiled style and script files from themes.

`laranix:tokens:clear`Clears expired tokens from the database for given models.

Default models for Laranix tokens are:

- `\Laranix\Auth\Email\Verification\Verification`
- `\Laranix\Auth\Password\Reset\Reset`

Additional Notes
----------------

[](#additional-notes)

### Views

[](#views)

Laranix provides several views to get you started, it also provides some mails in markdown format, so if you edit `config\laranixauth.php` to not use markdown on mails, you will have to edit the views in `resources/views/mail/auth/`.

### Webpack

[](#webpack)

Remember to update `webpack.mix.js` if you roll your own theme settings.

### Tests

[](#tests)

See [here](tests/README.md).

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

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

Recently: every ~29 days

Total

37

Last Release

2943d ago

Major Versions

1.1.x-dev → 2.0.02017-09-05

2.0.x-dev → 3.0.02017-12-05

3.0.x-dev → 4.0.02018-02-01

4.0.x-dev → 5.0.x-dev2018-06-02

PHP version history (2 changes)1.0.0PHP &gt;=7.1.0

4.0.0PHP ~7.1.0

### Community

Maintainers

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

---

Top Contributors

[![sanewsome](https://avatars.githubusercontent.com/u/31412306?v=4)](https://github.com/sanewsome "sanewsome (163 commits)")

---

Tags

laravelphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/samanix-laranix/health.svg)

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.3k2.2k](/packages/unopim-unopim)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.6M217](/packages/backpack-crud)[bagisto/bagisto

Bagisto Laravel E-Commerce

27.4k169.0k9](/packages/bagisto-bagisto)[krayin/laravel-crm

Krayin CRM

22.6k33.4k1](/packages/krayin-laravel-crm)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)

PHPackages © 2026

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