diff --git a/content/authors/timacdonald87.md b/content/authors/timacdonald87.md index 04563de..8a59d9f 100644 --- a/content/authors/timacdonald87.md +++ b/content/authors/timacdonald87.md @@ -1,5 +1,5 @@ --- username: timacdonald87 +avatar: 'https://pbs.twimg.com/profile_images/1495883253445959681/xLo3tosq_normal.jpg' name: 'Tim MacDonald' -avatar: 'https://pbs.twimg.com/profile_images/1249274319059841024/-8bpTPMC_normal.jpg' --- diff --git a/content/threads/weekly-thread-2022-25.md b/content/threads/weekly-thread-2022-25.md new file mode 100644 index 0000000..92087cf --- /dev/null +++ b/content/threads/weekly-thread-2022-25.md @@ -0,0 +1,11 @@ +--- +slug: weekly-thread-2022-25 +title: 'Weekly thread #25 of 2022' +tweet_id: '1540401124192112640' +author_username: archtechx +created_at: 2022-06-24T18:27:01+00:00 +links: { } +--- +๐Ÿ”ฅ This week's code tips for Laravel developers + +A weekly thread ๐Ÿงต \ No newline at end of file diff --git a/content/tips/rows-can-be-stored-in-an-already-sorted-way-instead-of-the-default-insertion-order.md b/content/tips/rows-can-be-stored-in-an-already-sorted-way-instead-of-the-default-insertion-order.md new file mode 100644 index 0000000..f55ba61 --- /dev/null +++ b/content/tips/rows-can-be-stored-in-an-already-sorted-way-instead-of-the-default-insertion-order.md @@ -0,0 +1,15 @@ +--- +title: 'Rows can be stored in an already sorted way, instead of the default insertion order' +tweet_id: '1540401132014411776' +thread_slug: weekly-thread-2022-25 +author_username: tobias_petry +images: + - 'https://pbs.twimg.com/media/FV2QgKRXwAIxTR_.jpg' +created_at: 2022-06-24T18:27:03+00:00 +slug: rows-can-be-stored-in-an-already-sorted-way-instead-of-the-default-insertion-order +--- +โšก๏ธ Database Tip + +In most applications, all rows are physically sorted in the database file by their insertion order. By sorting them instead optimally for your application a huge databases will still be amazingly fast. + +https://sqlfordevs.io/sorted-table-faster-range-scan \ No newline at end of file diff --git a/content/tips/str-gtplural-lets-you-convert-words-to-their-right-form-based-on-a-provided-amount.md b/content/tips/str-gtplural-lets-you-convert-words-to-their-right-form-based-on-a-provided-amount.md new file mode 100644 index 0000000..431a7a8 --- /dev/null +++ b/content/tips/str-gtplural-lets-you-convert-words-to-their-right-form-based-on-a-provided-amount.md @@ -0,0 +1,13 @@ +--- +title: 'str()->plural() lets you convert words to their right form based on a provided amount' +tweet_id: '1540401129363623936' +thread_slug: weekly-thread-2022-25 +author_username: ecrmnn +images: + - 'https://pbs.twimg.com/media/FV3zlAPVEAAWxIr.jpg' +created_at: 2022-06-24T18:27:03+00:00 +slug: str-gtplural-lets-you-convert-words-to-their-right-form-based-on-a-provided-amount +--- +Printing a word in singular or plural form depending on the number of items is usually a pain. + +With Laravel Str / Stringable however, it's a breeze ๐Ÿƒ ๐Ÿ˜ \ No newline at end of file diff --git a/content/tips/string-ids-can-be-case-sensitive.md b/content/tips/string-ids-can-be-case-sensitive.md new file mode 100644 index 0000000..fc18dcd --- /dev/null +++ b/content/tips/string-ids-can-be-case-sensitive.md @@ -0,0 +1,11 @@ +--- +title: 'String IDs can be case sensitive' +tweet_id: '1540401134761701376' +thread_slug: weekly-thread-2022-25 +author_username: ecrmnn +images: + - 'https://pbs.twimg.com/media/FVtZhvQUUAYjTE_.jpg' +created_at: 2022-06-24T18:27:04+00:00 +slug: string-ids-can-be-case-sensitive +--- +You can make your IDs case sensitive when using strings as primary keys in Laravel โœจ \ No newline at end of file diff --git a/content/tips/you-can-generate-fake-values-anywhere-in-your-app-using-the-new-fake-helper.md b/content/tips/you-can-generate-fake-values-anywhere-in-your-app-using-the-new-fake-helper.md new file mode 100644 index 0000000..94c858f --- /dev/null +++ b/content/tips/you-can-generate-fake-values-anywhere-in-your-app-using-the-new-fake-helper.md @@ -0,0 +1,15 @@ +--- +title: 'You can generate fake values anywhere in your app using the new `fake()` helper' +tweet_id: '1540401126696030208' +thread_slug: weekly-thread-2022-25 +author_username: timacdonald87 +images: + - 'https://pbs.twimg.com/media/FV5jtc0aAAATJNK.jpg' +created_at: 2022-06-24T18:27:02+00:00 +slug: you-can-generate-fake-values-anywhere-in-your-app-using-the-new-fake-helper +--- +Enjoying the little things: the new `fake()` helper we introduced to Laravel. + +Because it is a singleton, you can get unique values across multiple calls / boundaries. + +Super useful for tests, factories, seeders, and for quickly prototyping a design with fake data โœŒ๏ธ \ No newline at end of file