{"id":20131871,"url":"https://github.com/lahirulhr/nova-lock-screen","last_synced_at":"2025-06-11T00:34:06.345Z","repository":{"id":189377498,"uuid":"680216753","full_name":"lahirulhr/nova-lock-screen","owner":"lahirulhr","description":"Simple lock screen feature to Laravel nova dashboard","archived":false,"fork":false,"pushed_at":"2024-01-02T14:11:50.000Z","size":1335,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T21:18:04.618Z","etag":null,"topics":["laravel","lock","nova","php","security"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lahirulhr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-18T16:18:06.000Z","updated_at":"2024-04-02T17:41:35.000Z","dependencies_parsed_at":"2025-04-09T16:44:03.403Z","dependency_job_id":"cbaa8821-9434-4e3f-8d69-21084cc60cae","html_url":"https://github.com/lahirulhr/nova-lock-screen","commit_stats":null,"previous_names":["lahirulhr/nova-lockscreen","lahirulhr/nova-lock-screen"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahirulhr%2Fnova-lock-screen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahirulhr%2Fnova-lock-screen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahirulhr%2Fnova-lock-screen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahirulhr%2Fnova-lock-screen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lahirulhr","download_url":"https://codeload.github.com/lahirulhr/nova-lock-screen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lahirulhr%2Fnova-lock-screen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259176056,"owners_count":22817108,"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","lock","nova","php","security"],"created_at":"2024-11-13T20:50:44.782Z","updated_at":"2025-06-11T00:34:06.285Z","avatar_url":"https://github.com/lahirulhr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lock Screen for Laravel Nova\n\n\u003cp align=\"center\"\u003e\n\n\u003cimg src=\"https://github.com/lahirulhr/nova-lockscreen/blob/29d54861af1a3dabde1d59bab75a7562615f38a8/cover.png\" /\u003e\n\n\u003c/p\u003e\n\n[![Latest Stable Version](http://poser.pugx.org/lahirulhr/nova-lock-screen/v)](https://packagist.org/packages/lahirulhr/nova-lock-screen) [![Total Downloads](http://poser.pugx.org/lahirulhr/nova-lock-screen/downloads)](https://packagist.org/packages/lahirulhr/nova-lock-screen) [![Latest Unstable Version](http://poser.pugx.org/lahirulhr/nova-lock-screen/v/unstable)](https://packagist.org/packages/lahirulhr/nova-lock-screen) [![License](http://poser.pugx.org/lahirulhr/nova-lock-screen/license)](https://packagist.org/packages/lahirulhr/nova-lock-screen) [![PHP Version Require](http://poser.pugx.org/lahirulhr/nova-lock-screen/require/php)](https://packagist.org/packages/lahirulhr/nova-lock-screen)\n\nThe lock screen is a simple security feature that works as locking overlay over the NOVA dashboard. If the user is idle for given timeout, the lockscreen will be activated automatically. Then the user needs to enter login password again to continue their session.\n\n### View\n\n\u003cp align=\"center\"\u003e\n\n\u003cimg src=\"https://github.com/lahirulhr/nova-lock-screen/blob/3c84ee30a83159fca5271fd93c20174ed7b7b072/sample.png\" /\u003e\n\n\u003c/p\u003e\n\n\n\n\n### How to use\n\n1. Run composer ``` composer require lahirulhr/nova-lock-screen ``` to install the package\n\n2. Publish config (Optional) `` php artisan vendor:publish --tag=\"nova-lock-screen.config\" ``\n\n3. Use ``LockScreen`` trait in User model\n\n```php\n\nuse Lahirulhr\\NovaLockScreen;\n\n\nclass User extends Model {\n\n  use LockScreen;\n  \n  // ... \n\n}\n\n\n```\n\n4. Register the Tool in Nova service provider\n\n\n``` php\n\nuse Lahirulhr\\NovaLockScreen\\NovaLockScreen;\n\npublic function tools()\n    {\n        return [\n            // ... ,\n            new NovaLockScreen,\n        ];\n    }\n\n```\n\n5. Register middleware in `` nova.php ``\n\n``` php\n\n'middleware' =\u003e [\n      // ... ,\n      \\Lahirulhr\\NovaLockScreen\\Http\\Middleware\\LockScreen::class,\n],\n\n```\n\n6. Done\n\n\n### Config\n\n``` php\n\n\u003c?php\n\n// config for Nova Lock Screen\n\nreturn [\n    // master lock\n    'enabled' =\u003e true,\n\n    // auth guard for lock screen\n    'guard' =\u003e 'web',\n\n    // if user has been inactive for this long time,  the app will be locked \n    'lock_timeout' =\u003e 15, // second\n\n    // default background image for lock screen\n    'background_image' =\u003e 'https://magnificentsrilanka.com/wp-content/uploads/2022/01/sigiriya-from-pidurangala-1.jpg',\n\n    // these urls are not locked by lock screen\n    'excluded_urls' =\u003e [\n        //\n    ],\n\n    // set custom url for lock screen\n        'lock_url' =\u003e 'nova-lock-screen',\n    \n    ];\n\n```\n\n\n### Set custom background image per user\n\nyou can override default background image by overriding `` getLockScreenImage()`` method in User model\n\n``` php\npublic function getLockScreenImage():String\n{\n    return 'url\\to\\image.jpg';\n}\n```\n\n### Enable/Disable lock screen per user\n\nuse ``` lockScreenEnabled() ``` method to override default lock status settings\n\n```php\npublic function lockScreenEnabled():bool\n{\n    return false;\n}\n\n```\n\n### Set locking timeout per user\n\nuse ``` lockScreenTimeout() ``` method to override default lock status settings\n\n```php\npublic function lockScreenTimeout():int\n{\n    return 60*10; // seconds\n}\n\n```\n\n\n### Customizing the lock screen\n\nThe lock screen page is built with Blade views. You can copy them into your resource directory by running `` php artisan vendor:publish --tag=\"nova-lock-screen.views\" `` command\nthen customize them as you want.\n\n\n## Credits\n\n- [Lahiru Tharaka](https://github.com/lahirulhr)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flahirulhr%2Fnova-lock-screen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flahirulhr%2Fnova-lock-screen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flahirulhr%2Fnova-lock-screen/lists"}