{"id":15480042,"url":"https://github.com/tyler36/isadmin","last_synced_at":"2026-05-02T14:33:27.149Z","repository":{"id":49052819,"uuid":"245048640","full_name":"tyler36/isAdmin","owner":"tyler36","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-03T00:27:01.000Z","size":258,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T04:30:23.424Z","etag":null,"topics":["laravel","laravel-package"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyler36.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-05T02:16:06.000Z","updated_at":"2022-10-20T00:44:22.000Z","dependencies_parsed_at":"2023-02-18T01:46:16.523Z","dependency_job_id":null,"html_url":"https://github.com/tyler36/isAdmin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2FisAdmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2FisAdmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2FisAdmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2FisAdmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyler36","download_url":"https://codeload.github.com/tyler36/isAdmin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246045291,"owners_count":20714753,"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":["laravel","laravel-package"],"created_at":"2024-10-02T04:40:23.257Z","updated_at":"2026-05-02T14:33:27.116Z","avatar_url":"https://github.com/tyler36.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# isAdmin\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Total Downloads][ico-downloads]][link-downloads]\n[![Build Status][ico-travis]][link-travis]\n[![StyleCI][ico-styleci]][link-styleci]\n\nThis is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list.\n\n## Installation\n\nVia Composer\n\n```bash\n$ composer require tyler36/isadmin\n```\n\nUpdate your ```.ENV``` file to include the administators email. Use a comma-separated string if there are multuple accounts.\n\n```\nAUTH_ADMINS_ADMINISTRATORS=admin@example.com\n```\n\nThe default configuration might not be suitable for everyone.\nTo change it, publish the configuration using the following command.\n\n```bash\n$ php artiasn vendor:publish --provider=Tyler36\\isAdmin\\isAdminServiceProvider\n```\n\n\n## Usage: Middleware\n1. Register the middleware in the ```app/Http/Kernel.php```. You can change the middleware short name by replacing ```auth.admin```.\n\n```php\n    protected $routeMiddleware = [\n        ...\n        'auth.admin'    =\u003e \\tyler36\\isAdmin\\isAdminMiddleware::class,\n        ...\n    ];\n```\n\n## Usage: Trait\n1. Add the trait to your user model\n\n```php\nclass User extends Authenticatable\n{\n    use Tyler36\\isAdmin\\isAdminTrait;\n    ....\n```\n\n2. You can know verify users on a model\n\n```php\n$user = new User();\n\n// Check if user is an admin\n$user-\u003eisAdmin();\n\n// Check if user is verified\n$user-\u003eisVerified();\n\n// Check if another user model ($someone) is an admin\n$user-\u003eisAdmin($someone);\n```\n\n## Change log\n\nPlease see the [changelog](changelog.md) for more information on what has changed recently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [contributing.md](contributing.md) for details and a todolist.\n\n## Security\n\nIf you discover any security related issues, please email author email instead of using the issue tracker.\n\n## Credits\n\n- [author name][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nlicense. Please see the [license file](license.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/tyler36/isadmin.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/tyler36/isadmin.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/tyler36/isadmin/master.svg?style=flat-square\n[ico-styleci]: https://styleci.io/repos/12345678/shield\n\n[link-packagist]: https://packagist.org/packages/tyler36/isadmin\n[link-downloads]: https://packagist.org/packages/tyler36/isadmin\n[link-travis]: https://travis-ci.org/tyler36/isadmin\n[link-styleci]: https://styleci.io/repos/12345678\n[link-author]: https://github.com/tyler36\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler36%2Fisadmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyler36%2Fisadmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler36%2Fisadmin/lists"}