{"id":14974951,"url":"https://github.com/mohmmedashraf/nova-hidden-field","last_synced_at":"2025-04-05T11:10:31.478Z","repository":{"id":57034105,"uuid":"157270009","full_name":"MohmmedAshraf/nova-hidden-field","owner":"MohmmedAshraf","description":"A Laravel Nova Hidden field.","archived":false,"fork":false,"pushed_at":"2024-10-14T11:42:19.000Z","size":111,"stargazers_count":34,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T10:09:09.941Z","etag":null,"topics":["laravel","laravel-nova","laravel-nova-field","laravel8","nova","php"],"latest_commit_sha":null,"homepage":"https://twitter.com/M7ammed_Ashraf","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/MohmmedAshraf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":"MohmmedAshraf"}},"created_at":"2018-11-12T20:08:13.000Z","updated_at":"2024-12-03T10:03:06.000Z","dependencies_parsed_at":"2025-02-16T20:20:35.166Z","dependency_job_id":null,"html_url":"https://github.com/MohmmedAshraf/nova-hidden-field","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohmmedAshraf%2Fnova-hidden-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohmmedAshraf%2Fnova-hidden-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohmmedAshraf%2Fnova-hidden-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohmmedAshraf%2Fnova-hidden-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohmmedAshraf","download_url":"https://codeload.github.com/MohmmedAshraf/nova-hidden-field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"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-nova","laravel-nova-field","laravel8","nova","php"],"created_at":"2024-09-24T13:51:18.516Z","updated_at":"2025-04-05T11:10:31.457Z","avatar_url":"https://github.com/MohmmedAshraf.png","language":"PHP","funding_links":["https://github.com/sponsors/MohmmedAshraf","https://www.buymeacoffee.com/outhebox","https://www.patreon.com/m_ashraf"],"categories":[],"sub_categories":[],"readme":"# Laravel Nova Hidden Field\n[![GitHub license](https://img.shields.io/github/license/MohmmedAshraf/nova-hidden-field.svg)](https://github.com/MohmmedAshraf/nova-hidden-field/blob/master/LICENSE.md)\n[![GitHub issues](https://img.shields.io/github/issues/MohmmedAshraf/nova-hidden-field.svg)](https://github.com/MohmmedAshraf/nova-hidden-field/issues)\n[![Total Downloads](https://poser.pugx.org/outhebox/nova-hidden-field/downloads)](https://packagist.org/packages/outhebox/nova-hidden-field)\n\n\n## Description\nThis field give the ability to add a hidden fields to your resources.\n\n## Support\n\n[\u003cimg src=\"https://outhebox-github-ads.s3.us-east-1.amazonaws.com/nova-hidden-field.jpg?t=1\" width=\"419px\" /\u003e](https://outhebox.dev/github-ad-click/nova-hidden-field).\n\nThank you for considering supporting the development of this package! If you'd like to contribute, you can buy me a coffee or sponsor me to help keep me motivated to continue improving this package. You can also support the project by starring ⭐ the repository.\n\nTo buy me a coffee, click the button below:\n\n\u003ca href=\"https://www.buymeacoffee.com/outhebox\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" style=\"height: 51px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\n## Requrements\n* Laravel 5.7+ with [Nova](https://nova.laravel.com).\n\n## Installation\nThis package can be installed through Composer.\n```bash\ncomposer require outhebox/nova-hidden-field\n```\n\n## Example Usage\nAdd the field to your resource in the ```fields``` method:\n```php\nuse Outhebox\\NovaHiddenField\\HiddenField;\n\nHiddenField::make('User', 'user_id')\n    -\u003ecurrent_user_id(),\n```\n\nAlso you can override the default value:\n```php\nuse Outhebox\\NovaHiddenField\\HiddenField;\n\nHiddenField::make('User', 'column_name')\n    -\u003edefaultValue($this-\u003eget_client_id()),\n\n/**\n * Function will return your value\n * the returned value should be string\n * \n * @return string\n */\npublic function get_client_id()\n{\n    $client = Client::find(1)-\u003efirst();\n    return $client-\u003eid;\n}\n```\n\nAnother option you may like if you want to use the relationship fields:\n```php\nuse Laravel\\Nova\\Fields\\BelongsTo;\nuse Outhebox\\NovaHiddenField\\HiddenField;\n\nHiddenField::make('User', 'user_id')\n    -\u003ehideFromIndex(),\n    -\u003ehideFromDetail(),\n    -\u003ecurrent_user_id()\n\nBelongsTo::make('User')\n    -\u003ehideWhenCreating(),\n    -\u003ehideWhenUpdating(),\n```\n\n## License\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Donate\nIf you like this package, you can show your appreciation 💜 by [donating any amount via Patreon](https://www.patreon.com/m_ashraf) to support ongoing development.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohmmedashraf%2Fnova-hidden-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohmmedashraf%2Fnova-hidden-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohmmedashraf%2Fnova-hidden-field/lists"}