Package Data | |
---|---|
Maintainer Username: | acacha |
Maintainer Contact: | sergiturbadenas@gmail.com (Sergi Tur Badenas) |
Package Create Date: | 2016-12-05 |
Package Last Update: | 2017-12-18 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-01-31 03:05:04 |
Package Statistics | |
---|---|
Total Downloads: | 35 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 23 |
Acacha users is a Laravel package that add Users managment support yo your Laravel app.
Via Composer please first create a new fresh Laravel Project:
laravel new laravel_with_users
cd laravel_with_users
Install adminlte-laravel template with:
adminlte-laravel install
Then install this Laravel Package using:
composer require acacha/users
Now install Javascript Vue components using:
npm install --save acacha-users
Modify your app.js Bundle to use acacha-users Vue components adding:
//Acacha Users management components
require('users-bootstrap');
Just after Vue installation. Now compile with:
npm install
npm run dev
Install also Spatie Laravel Permission Package:
composer require spatie/laravel-permission
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="config"
php artisan migrate
Configure App\User adding the following traits:
class User extends Authenticatable
{
use Notifiable, HasRoles, HasApiTokens, ExposePermissions, RevisionableTrait,HasUserMigrations;
Also install spatie/laravel-menu usign wizard:
php artisan adminlte:menu
Use llum boot to run migrations and other common firt execution tasks:
llum boot
Finally assure Laravel Passport (https://laravel.com/docs/5.5/passport) is installed and configured. Composer package is a dependency so no need to install explicitly but be sure to add CreateFreshApiToken midleware to Http/Kernel.php file
protected $middlewareGroups = [
'web' => [
...
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
],
And change auth configuration to use passport:
'guards' => [
...
'api' => [
'driver' => 'passport',
'provider' => 'users',
],
],
Via Composer please first create a new fresh Laravel Project:
laravel new laravel_with_users
cd laravel_with_users
Install adminlte-laravel template with:
adminlte-laravel install
Install Studio (https://github.com/franzliedke/studio) on your system or use Composer path repositories (https://getcomposer.org/doc/05-repositories.md#path)
With Composer Path repositories add in composer.json file just before require section
"repositories": [
{
"type": "path",
"url": "./users"
},
{
"type": "path",
"url": "./users-ebre-escool-migration"
}
],
Create folders users and users-ebre-escool-migration with packages (you can clone it):
https://github.com/acacha/users
https://github.com/acacha/users-ebre-escool-migration
Then install this Laravel Package using:
composer require acacha/stateful-eloquent:dev-master
composer require acacha/users:dev-master
composer require scool/ebre_escool_model:dev-master
composer require acacha/users-ebre-escool-migration:dev-master
Now is time to configure npm dependencies. Modify file webpack.mix.js adding:
.js .....
.sourceMaps()
.webpackConfig({
resolve: {
modules: [
path.resolve(__dirname, './users/resources/assets/js'),
path.resolve(__dirname, './users-ebre-escool-migration/resources/assets/js'),
path.resolve(__dirname, 'node_modules')
]
}
})
Compile Javascript bundle with Laravel Mix/webpack:
npm install
npm run dev
Vuetable-2 problem with transform-runtime (see also http://acacha.org/mediawiki/Vuetable2):
npm install --save-dev babel-plugin-transform-runtime babel-preset-stage-2
Add the suites to phpunit.xml file:
<testsuite name="Users">
<directory suffix="Test.php">./users/tests/Feature</directory>
</testsuite>
<testsuite name="UsersEbreEscoolMigration">
<directory suffix="Test.php">./users-ebre-escool-migration/tests/Feature</directory>
</testsuite>
And run phpunit.
$skeleton = new Acacha\Users();
echo $skeleton->echoPhrase('Hello, League!');
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email sergiturbadenas@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.