Skip to content
This repository has been archived by the owner on Aug 19, 2018. It is now read-only.

Commit

Permalink
Updated composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Ollie Read authored Jan 31, 2017
1 parent d7f2b87 commit 965f1eb
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Latest Stable Version](https://poser.pugx.org/ollieread/laravel-multitenancy/v/stable.png)](https://packagist.org/packages/ollieread/laravel-multitenancy) [![Total Downloads](https://poser.pugx.org/ollieread/laravel-multitenancy/downloads.png)](https://packagist.org/packages/ollieread/laravel-multitenancy) [![Latest Unstable Version](https://poser.pugx.org/ollieread/laravel-multitenancy/v/unstable.png)](https://packagist.org/packages/ollieread/laravel-multitenancy) [![License](https://poser.pugx.org/ollieread/laravel-multitenancy/license.png)](https://packagist.org/packages/ollieread/laravel-multitenancy)

- **Laravel**: 5.3
- **Laravel**: 5.3 & 5.4
- **Author**: Ollie Read
- **Author Homepage**: http://ollieread.com

Expand All @@ -14,7 +14,7 @@ The package itself works much in the same way as the default Auth library.
Firstly you want to include this package in your composer.json file.

"require": {
"ollieread/laravel-multitenancy": "dev-master"
"ollieread/laravel-multitenancy": "^2"
}

Now you'll want to update or install via composer.
Expand Down Expand Up @@ -84,6 +84,17 @@ There is a method for create route groups that should be part of the tenant syst
});
});

It is worth noting that if this method is called inside a group that has the default `web` group, it'll error. You should instead wrap the `web` group routes in this, eg:

protected function mapWebRoutes()
{
Multitenancy::routes(function (Router $router) {
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
});
}

To generate a url for a tenant based route, you can use the following methods:

Multitenancy::route($name, $paramaters = [], $absolute = false);
Expand Down Expand Up @@ -129,4 +140,4 @@ This package supports custom providers. To create a custom provider, create a cl
return new Database($app['db']->connection(), $config['table'], $config['identifiers']);
});

The method is setup for daisy chaining should you need to add multiple.
The method is setup for daisy chaining should you need to add multiple.

0 comments on commit 965f1eb

Please sign in to comment.