diff --git a/content/authors/abrardev99.md b/content/authors/abrardev99.md new file mode 100644 index 0000000..2a91586 --- /dev/null +++ b/content/authors/abrardev99.md @@ -0,0 +1,5 @@ +--- +username: abrardev99 +name: 'Abrar Ahmad' +avatar: 'https://pbs.twimg.com/profile_images/1362979075518648325/vQ52oxSn_normal.jpg' +--- diff --git a/content/threads/weekly-thread-2022-16.md b/content/threads/weekly-thread-2022-16.md new file mode 100644 index 0000000..9bd0c13 --- /dev/null +++ b/content/threads/weekly-thread-2022-16.md @@ -0,0 +1,11 @@ +--- +slug: weekly-thread-2022-16 +title: 'Weekly thread #16 of 2022' +tweet_id: '1517561123582619648' +author_username: archtechx +created_at: 2022-04-22T17:49: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/controllers-can-be-used-as-route-groups.md b/content/tips/controllers-can-be-used-as-route-groups.md new file mode 100644 index 0000000..58161b9 --- /dev/null +++ b/content/tips/controllers-can-be-used-as-route-groups.md @@ -0,0 +1,11 @@ +--- +title: 'Controllers can be used as route groups' +tweet_id: '1517561126334001153' +thread_slug: weekly-thread-2022-16 +author_username: justsanjit +images: + - 'https://pbs.twimg.com/media/FQYpHmkWYAQXE0J.jpg' +created_at: 2022-04-22T17:49:02+00:00 +slug: controllers-can-be-used-as-route-groups +--- +#Laravel Tip ⚡ Instead of using the controller in each route, consider using a route controller group. \ No newline at end of file diff --git a/content/tips/you-can-add-temporaryurl-to-any-storage-driver.md b/content/tips/you-can-add-temporaryurl-to-any-storage-driver.md new file mode 100644 index 0000000..1369b6a --- /dev/null +++ b/content/tips/you-can-add-temporaryurl-to-any-storage-driver.md @@ -0,0 +1,12 @@ +--- +title: 'You can add `temporaryUrl()` to any storage driver' +tweet_id: '1517561135108485120' +thread_slug: weekly-thread-2022-16 +author_username: abrardev99 +images: + - 'https://pbs.twimg.com/media/FQ2yBLeXEAAwNPY.jpg' +created_at: 2022-04-22T17:49:04+00:00 +slug: you-can-add-temporaryurl-to-any-storage-driver +--- +Laravel tip💡You can add a Temporary URL for the local storage driver +#laravel \ No newline at end of file diff --git a/content/tips/you-can-get-all-primary-keys-from-an-eloquent-collection-using-the-modelkeys-method.md b/content/tips/you-can-get-all-primary-keys-from-an-eloquent-collection-using-the-modelkeys-method.md new file mode 100644 index 0000000..5f0d693 --- /dev/null +++ b/content/tips/you-can-get-all-primary-keys-from-an-eloquent-collection-using-the-modelkeys-method.md @@ -0,0 +1,11 @@ +--- +title: 'You can get all primary keys from an Eloquent Collection using the modelKeys() method' +tweet_id: '1517561129215483907' +thread_slug: weekly-thread-2022-16 +author_username: SteveTheBauman +images: + - 'https://pbs.twimg.com/media/FQZb4jlWUA0WBWz.jpg' +created_at: 2022-04-22T17:49:02+00:00 +slug: you-can-get-all-primary-keys-from-an-eloquent-collection-using-the-modelkeys-method +--- +Always forget about the modelKeys method on Eloquent Collections for getting the ID's from a collection of models 👌 \ No newline at end of file diff --git a/content/tips/you-can-set-model-attributes-on-factories-using-the-set-method.md b/content/tips/you-can-set-model-attributes-on-factories-using-the-set-method.md new file mode 100644 index 0000000..acc1002 --- /dev/null +++ b/content/tips/you-can-set-model-attributes-on-factories-using-the-set-method.md @@ -0,0 +1,11 @@ +--- +title: 'You can set model attributes on factories using the set() method' +tweet_id: '1517561132222844928' +thread_slug: weekly-thread-2022-16 +author_username: justsanjit +images: + - 'https://pbs.twimg.com/media/FQVWw4oXIAAV6Fv.jpg' +created_at: 2022-04-22T17:49:03+00:00 +slug: you-can-set-model-attributes-on-factories-using-the-set-method +--- +#Laravel 9.8.0 adds a set() model factory method that allows you to set a single model attribute. \ No newline at end of file