krafthaus/bauhaususer

User support for bauhaus

Installs: 234

Dependents: 0

Suggesters: 1

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 3

Type:laravel-package

dev-master 2017-01-05 22:43 UTC

This package is auto-updated.

Last update: 2024-04-29 03:26:46 UTC


README

Total Downloads License

Bauhaus itself is a bring-your-own-authentication kind of package and therefor does not, by default, come with a user login. To fix this you can either:

  • Use something like Sentry
  • Or use Bauhaus User

Installation

Add bauhaus user to your composer.json file:

"require": {
	"krafthaus/bauhaususer": "dev-master"
}

Use composer to install this package.

$ composer update

Register the package

'providers' => array(
	'KraftHaus\Bauhaus\BauhausServiceProvider', // This should already be there
	'KraftHaus\BauhausUser\BauhausUserServiceProvider'
)

Update auth.permission

In app/config/packages/krafthaus/config/admin.php update

'auth' => [
	'permission' => function () {
		return true;
	}
]

to:

'auth' => [
	'permission' => function () {
		return Auth::check();
	}
]

Update auth.model

In app/auth.php update

'model' => 'User'

to:

'model' => 'KraftHaus\BauhausUser\User'

Run the migrations

$ php artisan migrate --package=krafthaus/bauhaususer

Create your first user

$ php artisan bauhaus:user:register email password [firstname] [lastname]

Now, when you visit the admin url you'll be presented with a brand new, ultra awesome, login screen where you can login with you newly created user.