mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 13:24:03 +00:00
Week 27/2022
This commit is contained in:
parent
bcc973cc4b
commit
d5718fbbc8
4 changed files with 46 additions and 1 deletions
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: 'You can use the boolean() / date() / string() methods on the Request object instead of manually type-casting request parameters'
|
||||
tweet_id: '1545466006096687110'
|
||||
thread_slug: weekly-thread-2022-27
|
||||
author_username: ryangjchandler
|
||||
images:
|
||||
- 'https://pbs.twimg.com/media/FWhgKQPXwAELDpV.jpg'
|
||||
created_at: 2022-07-08T17:53:03+00:00
|
||||
slug: you-can-use-the-boolean-date-string-methods-on-the-request-object-instead-of-manually-type-casting-request-parameters
|
||||
---
|
||||
⚡️ Instead of explicitly type-casting or wrapping request parameters, you can use some of Laravel's utility methods on the Request object. It comes with a boolean() helper, date() helper and a string() / str() helper!
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: 'You can validate JSON columns at database level'
|
||||
tweet_id: '1545466000790892544'
|
||||
thread_slug: weekly-thread-2022-27
|
||||
author_username: tobias_petry
|
||||
images:
|
||||
- 'https://pbs.twimg.com/media/FW-NXH9X0AE4uSd.jpg'
|
||||
created_at: 2022-07-08T17:53:02+00:00
|
||||
slug: you-can-validate-json-columns-at-database-level
|
||||
---
|
||||
⚡️ Database Tip
|
||||
|
||||
Extending a traditional database schema with NoSQL-like JSON columns can make the schema more understandable. But you should also ensure these JSON documents conform to an expected schema!
|
||||
|
||||
https://sqlfordevs.io/json-schema-validation
|
||||
Loading…
Add table
Add a link
Reference in a new issue