{"id":18704768,"url":"https://github.com/lancewan/multi-auth","last_synced_at":"2025-11-09T05:30:26.094Z","repository":{"id":56994937,"uuid":"64835394","full_name":"lanceWan/multi-auth","owner":"lanceWan","description":"多用户登录扩展(multi-auth for Laravel5.2)","archived":false,"fork":false,"pushed_at":"2016-08-09T08:02:38.000Z","size":32,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-28T06:26:19.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.iwanli.me","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lanceWan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-03T09:58:59.000Z","updated_at":"2020-04-12T12:58:53.000Z","dependencies_parsed_at":"2022-08-21T13:50:38.002Z","dependency_job_id":null,"html_url":"https://github.com/lanceWan/multi-auth","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanceWan%2Fmulti-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanceWan%2Fmulti-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanceWan%2Fmulti-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanceWan%2Fmulti-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lanceWan","download_url":"https://codeload.github.com/lanceWan/multi-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239567634,"owners_count":19660518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T12:08:17.790Z","updated_at":"2025-11-09T05:30:26.048Z","avatar_url":"https://github.com/lanceWan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# multi-auth\n\u003e Custom your Auth Drivers\n\n# Installation\n```\ncomposer require iwanli/multi-auth\n```\n\n**Or**\n\nFirst, pull in the package through Composer.\n\n```\n\"iwanli/multi-auth\": \"~0.1.*\"\n```\n\nNow you'll want to update or install via composer.\n\n```\ncomposer update\n```\n\n# Providers\nopen your `config/app.php` and add this line in providers section .\n\n```\nIwanli\\MultiAuth\\MultiAuthServiceProvider::class,\n```\n\n# Configuration\nAnd the last, publish the package's configuration by running:\n\n```\nphp artisan vendor:publish\n```\n\nThat will publish the `multi.php` config file to your `config/` folder .\n\n```php\n\u003c?php\nreturn [\n    /**\n     * auth view directroy\n     */\n\t'directory' =\u003e[\n\t\t'layouts' \t=\u003e 'resources/views/layouts',\n\t\t'auth' \t\t=\u003e [\n\t\t\t'passwords' =\u003e 'resources/views/multi-auth/passwords',\n\t\t\t'emails' \t=\u003e 'resources/views/multi-auth/emails'\n\t\t]\n\t],\n    /**\n     * auth view file name \n     */\n\t'views' =\u003e [\n        'login' \t=\u003e 'multi-auth/login.blade.php',\n        'register' \t=\u003e 'multi-auth/register.blade.php',\n        'email' \t=\u003e 'multi-auth/passwords/email.blade.php',\n        'reset' \t=\u003e 'multi-auth/passwords/reset.blade.php',\n        'password' \t=\u003e 'multi-auth/emails/password.blade.php',\n        'app' \t\t=\u003e 'layouts/app.blade.php',\n        'home' \t\t=\u003e 'home.blade.php',\n        'welcome' \t=\u003e 'welcome.blade.php',\n    ],\n    /*\n    |--------------------------------------------------------------------------\n    | Authentication Guards\n    |--------------------------------------------------------------------------\n    */\n    'auth' =\u003e [\n    \t'guards' =\u003e [\n            'admin' =\u003e [\n                'driver'    =\u003e 'session',\n                'provider'  =\u003e 'admins',\n            ]\n        ],\n        'providers' =\u003e [\n            'admins' =\u003e [\n                'driver' =\u003e 'eloquent',\n                /**\n                 * According to this configuration will create the corresponding model and migration\n                 */\n                'model' =\u003e 'App\\Models\\Admin',\n            ],\n        ],\n        /**\n         * Plan development...\n         */\n        'passwords' =\u003e [\n            'admins' =\u003e [\n                'provider' =\u003e 'admins',\n                'email' =\u003e 'mulit-auth.emails.password',\n                'table' =\u003e 'password_resets',\n                'expire' =\u003e 60,\n            ],\n        ],\n        /**\n         * The route of the jump after the success of the certification\n         */\n\t    'redirectTo' =\u003e '/admin',\n        /**\n         * custom AuthController login view\n         */\n\t    'loginView' =\u003e 'multi-auth.login',\n        /**\n         * custom AuthController register view\n         */\n\t    'registerView' =\u003e 'multi-auth.register',\n    ]\n];\n```\n\n# Usage\n\n```\nphp artisan make:multi-auth Admin/LoginController\n```\nOr mandatory coverage of existing documents\n\n```\nphp artisan make:multi-auth Admin/LoginController --force\n```\n\nThe Artisan command generates the routes, views controller and update `Authenticate` middleware required for user authentication .\n\nOk,that's all, enjoy it!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flancewan%2Fmulti-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flancewan%2Fmulti-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flancewan%2Fmulti-auth/lists"}