Skip to content

Instantly share code, notes, and snippets.

@skeltonmod
Last active February 1, 2023 15:31
Show Gist options
  • Save skeltonmod/74853d5aa3a633ff8a7756d0eef9b30b to your computer and use it in GitHub Desktop.
Save skeltonmod/74853d5aa3a633ff8a7756d0eef9b30b to your computer and use it in GitHub Desktop.

User Management Rewrite Branch

This is the scaffold, features are still being ported over from the app using this This tool

Software License Travis Total Downloads

Installation

API Installation

Assuming you have already made a laravel project

  1. Clone this repo/branch by running

    git clone https://git.fligno.com/marketplace/fromager-laravel/laravel-user-management.git -b enhancement/rewrite-vue
  2. In your laravel application composer.json file add this line
    (where package_location is the path to your package relative to your composer.json file)

    "repositories":[{
         "type": "path",
         "url": "<package_location>"   
        }]
  3. Update your composer by running

    composer update 
    
  4. Install the package

    composer require deyji/manage 
    
  5. Run the required migrations by running

    php artisan migrate
  6. Install passport by running

    php artisan passport:install 
  7. Run the role seed

    php artisan db:seed --class=RoleSeeder
  8. Setup your environment's email provider

You can stop here and use the API only but if you want to use this package with vue then proceed below

Frontend Installation (Optional)

  1. For the front-end to work nicely you need to seed the database with the default roles
    to do that, you must run

    php artisan db:seed --class=RoleSeeder
  2. Publish the resources by running

    php artisan vendor:publish --tag=view --force

    NOTE: only run force if you have a new project or your package.json and webpack.mix.js will be overwritten

  3. Install the front-end dependencies by running

    npm install
  4. Bundle the front-end after installing the required dependencies by running

    npm run dev

Usage

After installing and setting up the package you can serve it by typing

php artisan serve

Laravel User Management Rewrite

A total rewrite of another existing User Management, Designed to future proof development by using custom implementations while using only a few existing laravel functions, and it doesn't rely on third-party packages.

Currently, this is the workbench/testbench version of the package. Ideally, this will be the first to be used with the new pipeline. Pipeline tool Currently work in progess

This project aims to be as zero config as possible

Testing

Run the tests with:

vendor/bin/phpunit

ToDo

  • Custom Authentication, now uses OAuth or Auth0
  • Map API, currently supports OSM only
  • Login Throttling
  • Password Resets
  • Custom Email Verification
  • Custom Roles
  • Organizations
  • Social Sign In, Currently Supports Facebook only
  • Customizable Admin App Settings
  • Timezones
  • User Management
  • Coming Soon Email Blast
  • Timed Sessions (Client Side)

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment