diff --git a/content/authors/danjharrin.md b/content/authors/danjharrin.md index be4f530..493623f 100644 --- a/content/authors/danjharrin.md +++ b/content/authors/danjharrin.md @@ -1,5 +1,5 @@ --- username: danjharrin +avatar: 'https://pbs.twimg.com/profile_images/1516140349890170883/Y275v9JG_normal.jpg' name: 'Dan Harrin 🦒' -avatar: 'https://pbs.twimg.com/profile_images/1438071617045901316/2jc7vDE7_normal.jpg' --- diff --git a/content/authors/realstevebauman.md b/content/authors/realstevebauman.md new file mode 100644 index 0000000..62577d7 --- /dev/null +++ b/content/authors/realstevebauman.md @@ -0,0 +1,5 @@ +--- +username: realstevebauman +name: 'Steve Bauman' +avatar: 'https://pbs.twimg.com/profile_images/1447680179560751115/8Wm9RSco_normal.jpg' +--- diff --git a/content/threads/weekly-thread-2022-28.md b/content/threads/weekly-thread-2022-28.md new file mode 100644 index 0000000..58c22ce --- /dev/null +++ b/content/threads/weekly-thread-2022-28.md @@ -0,0 +1,19 @@ +--- +slug: weekly-thread-2022-28 +title: 'Weekly thread #28 of 2022' +tweet_id: '1547939795942248451' +author_username: archtechx +created_at: 2022-07-15T13:43:01+00:00 +links: { } +--- +🔥 This week's code tips and updates for Laravel developers include: + +✨ Laravel Nova v4.12 +🔥 Blade hot refreshing +👨🏻‍🏫 Learn with Christoph Rumpel +3️⃣ Three rules for creating database indices +🆓 Request Data Access task in Shift Workbench + +and more... + +Thread #129 \ No newline at end of file diff --git a/content/tips/be-careful-if-youre-not-scoping-your-route-model-bindings.md b/content/tips/be-careful-if-youre-not-scoping-your-route-model-bindings.md new file mode 100644 index 0000000..79ab67d --- /dev/null +++ b/content/tips/be-careful-if-youre-not-scoping-your-route-model-bindings.md @@ -0,0 +1,11 @@ +--- +title: 'Be careful if you''re not scoping your route model bindings ' +tweet_id: '1547939806788734976' +thread_slug: weekly-thread-2022-28 +author_username: realstevebauman +images: + - 'https://pbs.twimg.com/media/FXoucXVUEAINVm5.jpg' +created_at: 2022-07-15T13:43:03+00:00 +slug: be-careful-if-youre-not-scoping-your-route-model-bindings +--- +I've caught myself writing this security bug many times in controllers, making the assumption that Laravel will retrieve child route bound models by the parent model *by default*. Be careful if you're not scoping your route model bindings! \ No newline at end of file diff --git a/content/tips/you-can-time-travel-in-your-tests.md b/content/tips/you-can-time-travel-in-your-tests.md new file mode 100644 index 0000000..286ffd6 --- /dev/null +++ b/content/tips/you-can-time-travel-in-your-tests.md @@ -0,0 +1,17 @@ +--- +title: 'You can time travel() in your tests ' +tweet_id: '1547939812220407808' +thread_slug: weekly-thread-2022-28 +author_username: ecrmnn +images: + - 'https://pbs.twimg.com/media/FXevKR8UIAAY40z.jpg' +created_at: 2022-07-15T13:43:05+00:00 +slug: you-can-time-travel-in-your-tests +--- +🔮 Travel in time in your Laravel tests. + +Using the *travel()* method you can travel back and forward in time. + +No more Carbon::setTestNow() + +Super useful 👏 \ No newline at end of file diff --git a/content/tips/you-can-use-strmarkdown-to-build-translation-strings.md b/content/tips/you-can-use-strmarkdown-to-build-translation-strings.md new file mode 100644 index 0000000..eee5969 --- /dev/null +++ b/content/tips/you-can-use-strmarkdown-to-build-translation-strings.md @@ -0,0 +1,15 @@ +--- +title: 'You can use `Str::markdown` to build translation strings ' +tweet_id: '1547939801373892620' +thread_slug: weekly-thread-2022-28 +author_username: danjharrin +images: + - 'https://pbs.twimg.com/media/FXKnQBLWQAAVcuQ.jpg' +created_at: 2022-07-15T13:43:02+00:00 +slug: you-can-use-strmarkdown-to-build-translation-strings +--- +Ever needed to add HTML *inside* a Laravel translation string, and had to split the string up into chunks? + +Or felt bad about raw HTML in your translations? + +Here's a little cheat - parse markdown. Most of the formatting you want to do inside a translation string is available. 🤷‍♂️ \ No newline at end of file