Title: [5.x] Set the hidden attributes programmaticaly · Issue #283 · bowphp/framework · GitHub
Open Graph Title: [5.x] Set the hidden attributes programmaticaly · Issue #283 · bowphp/framework
X Title: [5.x] Set the hidden attributes programmaticaly · Issue #283 · bowphp/framework
Description: The hidden attributes do not show the attributes where user try to show the model as json format. It's actually made from the model property like this class UserModel extens Model { /** * The hidden attributes * * @var array */ protected...
Open Graph Description: The hidden attributes do not show the attributes where user try to show the model as json format. It's actually made from the model property like this class UserModel extens Model { /** * The hidde...
X Description: The hidden attributes do not show the attributes where user try to show the model as json format. It's actually made from the model property like this class UserModel extens Model { /** * The h...
Opengraph URL: https://github.com/bowphp/framework/issues/283
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[5.x] Set the hidden attributes programmaticaly","articleBody":"The hidden attributes do not show the attributes where user try to show the model as json format.\n\nIt's actually made from the model property like this\n\n```php\nclass UserModel extens Model\n{\n /**\n * The hidden attributes\n *\n * @var array\n */\n protected array $hidden = [\n \"created_at\",\n \"updated_at\",\n ];\n```\n\nFor this cas the hidden attributes should be made programmaticaly.\n\n```php\n $user-\u003esetHiddenAttributes([\"password\"]);\n```\n\nThe short code for implementing the method:\n\n```php\n /**\n * Set the hidden attributes\n *\n * @param array $attributes\n */\n public function setHiddenAttributes(array $attributes)\n {\n $this-\u003ehidden = array_merge($this-\u003ehidden, $attributes);\n }\n```","author":{"url":"https://github.com/papac","@type":"Person","name":"papac"},"datePublished":"2023-12-02T10:57:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/283/framework/issues/283"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ca1f7a2a-af59-801f-2545-6106441f5428 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 885C:10DBCE:C429E9:FFF5E1:698E8D45 |
| html-safe-nonce | 5d6acd1d3a782fd594da853414dd9ed162d968ef32d5b24d3d61cfc16303a7f1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODVDOjEwREJDRTpDNDI5RTk6RkZGNUUxOjY5OEU4RDQ1IiwidmlzaXRvcl9pZCI6IjMyNzcyODU2MjAzMDEzMzU4NzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 20970e69742c946e9db17d1d6e6e7f2b7f90dc68704ebcf355cb387b86476f79 |
| hovercard-subject-tag | issue:2021993372 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bowphp/framework/283/issue_layout |
| twitter:image | https://opengraph.githubassets.com/44454f1ce7043a5d4a8393b5162460bf8cffa12f9d1051b20c3a756ff0f417cf/bowphp/framework/issues/283 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/44454f1ce7043a5d4a8393b5162460bf8cffa12f9d1051b20c3a756ff0f417cf/bowphp/framework/issues/283 |
| og:image:alt | The hidden attributes do not show the attributes where user try to show the model as json format. It's actually made from the model property like this class UserModel extens Model { /** * The hidde... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | papac |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| turbo-cache-control | no-preview |
| go-import | github.com/bowphp/framework git https://github.com/bowphp/framework.git |
| octolytics-dimension-user_id | 40915649 |
| octolytics-dimension-user_login | bowphp |
| octolytics-dimension-repository_id | 140084325 |
| octolytics-dimension-repository_nwo | bowphp/framework |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 140084325 |
| octolytics-dimension-repository_network_root_nwo | bowphp/framework |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width