1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00
laravel-tips/content/tips
2022-01-07 13:58:01 +01:00
..
add-a-recursive-macro-to-convert-an-array-including-its-children-to-collections.md Add this week's tips 2021-11-12 18:43:31 +01:00
adding-where-scopes-which-use-an-indexed-column-to-a-query-thats-primarily-filtered-by-another-column-is-a-great-way-to-speed-up-db-performance.md Weekly thread #50 2022-01-07 13:58:01 +01:00
advanced-notifications.md livewire thread 2021-04-09 18:47:19 +02:00
advanced-trait-design.md livewire thread 2021-04-09 18:47:19 +02:00
avoid-helper-classes.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
avoid-queries-in-blade-when-possible.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
be-friends-with-your-ide.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
call-methods-from-javascript.md livewire thread 2021-04-09 18:47:19 +02:00
closure-validation-rules-are-theyre-often-better-than-creating-a-class-just-for-a-single-use.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
comparing-changes-on-saving-using.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
compose-components-using-traits.md livewire thread 2021-04-09 18:47:19 +02:00
consider-single-action-controllers.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
consider-using-form-requests.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
consider-using-helpers-instead-of-facades-they-can-clean-things-up.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
consider-using-mb-functions-when-working-with-localized-strings.md Weekly thread #47 2021-11-26 16:21:56 +01:00
context-matters.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
create-a-using-helper-in-pest.md Fix content, add command, update readme 2021-08-27 18:37:33 +02:00
create-action-classes.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
create-an-attempt-helper-for-calls-that-can-silently-fail.md Weekly thread #47 2021-11-26 16:21:56 +01:00
create-custom-blade-directives-for-business-logic.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
create-fluent-objects.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
create-helper-functions-for-creating-models-in-tests-using-factories.md Fix content, add command, update readme 2021-08-27 18:37:33 +02:00
create-helper-functions.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
create-model-methods-for-business-logic.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
create-query-scopes-for-complex-wheres.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
create-renderable-exceptions.md Weekly thread #46 2021-11-19 16:10:01 +01:00
create-single-use-blade-includes.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
create-single-use-traits.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
create-this-tinker-bash-script-to-supercharge-your-dev-workflow.md Fix thread command 2021-10-29 20:45:20 +02:00
create-traits-for-relationships-you-commonly-use-in-your-models-to-make-your-codebase-cleaner-simpler-and-more-consistent.md Weekly thread #43 2021-10-29 21:16:27 +02:00
create-variables-when-they-improve-readability.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
custom-response-effects.md livewire thread 2021-04-09 18:47:19 +02:00
customize-the-page-that-users-are-redirected-to-after-registration-by-changing-a-value-in-the-fortify-config.md Add new tips thread 2021-11-05 17:12:37 +01:00
dedicate-a-weekend-towards-learning-proper-oop.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
dont-create-variables-when-you-can-just-pass-the-value-directly.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
dont-just-write-procedural-code-in-classes.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
dont-split-lines-at-random-places-but-dont-make-them-too-long-either.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
dont-use-a-controller-namespace.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
dont-use-abbreviations.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
dont-use-model-methods-to-retrieve-data.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
eloquent-listeners-are-awesome.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
example-checking-a-parent-relationship-for-some-things.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
example-deleting-associated-files-on-deletion.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
extract-methods.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
have-a-single-source-of-truth-for-validation-rules.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
heres-another-example-of-the-model-state-stuff-mentioned-above.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
if-you-didnt-know-at-laravellivewire-now-triggers-updated-and-updating-hooks-for-nested-properties-which-works-with-both-array-and-model-properties.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
if-you-dont-like-the-double-indentation-of-vue-data-you-can-use-arrow-functions.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
if-you-want-to-identify-teams-workspaces-etc-by-path-you-dont-have-to-pass-the-team-id-to-every-route.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
if-youre-debugging-your-app-and-youd-like-to-examine-more-things-eg-the-stack-trace-executed-queries-app-context.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
if-youre-returning-class-names-as-opposed-to-instances-you-can-use-the-class-name-docblock.md Weekly thread #49 2021-12-10 16:25:33 +01:00
implement-the-tostring-method-in-a-class-to-specify-custom-logic-for-converting-its-instances-to-strings.md Weekly thread #43 2021-10-29 21:16:27 +02:00
import-namespaces-instead-of-using-aliases.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
including-a-unique-value-like-now-or-strrandom-in-the-blade-template-of-a-livewire-component-is-a-great-way-to-check-if-that-part-of-the-dom-is-getting-re-rendered.md Weekly thread #46 2021-11-19 16:10:01 +01:00
instead-of-writing-repetitive-else-if-statements-use-an-array-to-look-up-the-wanted-value-based-on-the-key-you-have.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
its-about-the-micro.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
keep-validation-rules-inside-models-to-make-your-code-more-consistent-and-clean.md Weekly thread #49 2021-12-10 16:25:33 +01:00
laravel-can-automatically-notify-you-by-email-when-a-scheduled-job-fails.md Weekly thread #47 2021-11-26 16:21:56 +01:00
laravel-migrations-have-a-very-nice-syntax-for-foreign-keys.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
laravel-nova-lets-you-show-different-resourcestoolscards-based-on-an-if-check.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
laravel-telescope-is-great-for-so-many-things.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
livewire-readonly-properties.md livewire thread 2021-04-09 18:47:19 +02:00
people-underutilize-the-exception-handler.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
relevant-for-people-building-packages.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
replace-state-with-a-custom-directive.md livewire thread 2021-04-09 18:47:19 +02:00
share-state-using-sprucewire.md livewire thread 2021-04-09 18:47:19 +02:00
the-latestofmany-method-lets-you-use-a-hasmany-relation-as-a-hasone-relation-returning-the-latest-record.md Weekly thread #48 2021-12-03 18:31:27 +01:00
there-are-multiple-ways-to-redirect-users.md Fix thread command 2021-10-29 20:45:20 +02:00
theres-great-value-in-understanding-how-object-state-of-models-works-this-is-mostly-relevant-in-feature-tests-because-they-touch-many-parts-of-your-codebase-in-one-phplaravel-app-state.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
this-one-is-less-obscure.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
this-pattern-is-brilliant-and-can-make-your-code-much-more-clean-and-consistent.md Weekly thread #49 2021-12-10 16:25:33 +01:00
this-wont-fit-into-one-tweet-but-theres-so-much-cool-stuff-you-can-do-with-eloquent.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
try-to-avoid-unnecessary-nesting-by-returning-a-value-early.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-aggregate-methods-to-count-related-models.md Weekly thread #47 2021-11-26 16:21:56 +01:00
use-appends-to-include-properties-in-the-array-representation-of-your-model.md Weekly thread #46 2021-11-19 16:10:01 +01:00
use-collections-when-they-can-clean-up-your-code.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-common-table-expressions-to-refine-your-data-in-complex-eloquent-queries.md Add this week's tips 2021-11-12 18:43:31 +01:00
use-constructor-property-promotion-to-define-class-properties-directly-on-the-constructor.md Weekly thread #43 2021-10-29 21:16:27 +02:00
use-custom-collections.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-custom-config-files.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-data-transfer-objects-dtos.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-declarestrict-types1-to-enable-strict-mode-for-type-checking.md Weekly thread #43 2021-10-29 21:16:27 +02:00
use-docblocks-only-when-they-clarify-things.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-events.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-explicit-null-handling-in-your-db-queries-when-filtering-for-rows-with-empty-value-in-a-nullable-column.md Weekly thread #46 2021-11-19 16:10:01 +01:00
use-expressive-names-for-methods.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-match-or-switch-statements-to-conditionally-scope-database-queries-based-on-query-strings-in-the-request.md Weekly thread #50 2022-01-07 13:58:01 +01:00
use-not-to-reverse-an-assertion-in-pestphp.md Weekly thread #43 2021-10-29 21:16:27 +02:00
use-prefetching-to-boost-the-perceived-speed-of-livewire-apps.md Weekly thread #47 2021-11-26 16:21:56 +01:00
use-retry-for-callbacks-that-may-randomly-fail.md Weekly thread #50 2022-01-07 13:58:01 +01:00
use-short-operators.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-strict-comparison.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
use-test-files-to-describe-your-thoughts-about-a-specific-feature-in-full-before-starting-implementation.md Fix thread command 2021-10-29 20:45:20 +02:00
use-the-aftermaking-or-aftercreating-hooks-in-factories-to-execute-additional-logic.md Weekly thread #48 2021-12-03 18:31:27 +01:00
use-the-app-gtterminating-hook-to-perform-tasks-after-the-response-has-been-sent-to-the-user.md Weekly thread #48 2021-12-03 18:31:27 +01:00
use-the-loop-variable-in-blade-foreach-loops-to-access-metadata-about-the-loop.md Weekly thread #46 2021-11-19 16:10:01 +01:00
use-the-nullordelete-method-in-your-relationship-column-definitions-to-clear-their-value-when-the-parent-record-gets-deleted.md Weekly thread #46 2021-11-19 16:10:01 +01:00
use-the-quietly-methods-to-create-models-without-firing-events-using-your-factories.md Weekly thread #46 2021-11-19 16:10:01 +01:00
use-the-requests-flag-when-creating-models-to-also-create-form-requests.md Add this week's tips 2021-11-12 18:43:31 +01:00
use-the-reset-method-to-reset-properties-to-their-original-state-in-livewire.md Add new tips thread 2021-11-05 17:12:37 +01:00
use-the-something-at-convention-instead-of-is-something-in-your-table-definitions.md Weekly thread #46 2021-11-19 16:10:01 +01:00
use-the-strheadline-method-to-convert-strings-to-studly-words.md Add this week's tips 2021-11-12 18:43:31 +01:00
use-the-withaggregate-method-to-add-related-values-to-eloquent-queries-using-subselects.md Add this week's tips 2021-11-12 18:43:31 +01:00
use-typehints-wherever-possible-to-improve-code-safety-and-ide-support.md Weekly thread #49 2021-12-10 16:25:33 +01:00
use-wherebelongsto-and-relation-is-instead-of-comparing-ids-manually.md Weekly thread #48 2021-12-03 18:31:27 +01:00
use-wire-entangle-instead-of-entangle.md livewire thread 2021-04-09 18:47:19 +02:00
use-wire-replace.md livewire thread 2021-04-09 18:47:19 +02:00
using-small-integers-instead-of-entire-class-strings-for-morph-relations-can-improve-their-performance.md Add new tips thread 2021-11-05 17:12:37 +01:00
wanna-update-a-set-of-eloquent-models-and-have-the-change-updated-in-the-database-and-in-your-in-memory-instances-but-dont-wanna-incur-a-database-query-for-each-model.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
when-a-relationship-is-already-loaded-and-cached-on-the-model-instance-youll-have-to-refresh-it.md Fixed text encoding issue 2021-04-12 18:31:29 +01:00
when-im-converting-data-into-a-different-structure-one-thing-i-like-to-do-is-annotate-how-the-structure-looks-at-each-point-of-the-process.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
write-functional-code-when-it-benefits-you.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
writing-simple-page-can-be-visited-tests-is-a-great-way-to-get-started-with-testing.md Weekly thread #49 2021-12-10 16:25:33 +01:00
yesterday-in-my-at-laracononline-talk-i-explained-how-to-use-the-query-builder-when-method-to-handle-complex-sorting.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
you-can-add-a-messages-method-to-form-requests-to-customize-their-validation-error-messages.md Weekly thread #49 2021-12-10 16:25:33 +01:00
you-can-add-a-refresh-flag-to-the-artisan-down-command-to-send-a-refresh-header-to-the-browser.md Weekly thread #50 2022-01-07 13:58:01 +01:00
you-can-add-a-tags-method-to-a-job-anything-you-return-from-this-method-will-be-displayed-in-horizon.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
you-can-add-the-prunable-trait-to-soft-delete-models-from-the-database-but-only-remove-them-permanently-after-a-few-days.md Add this week's tips 2021-11-12 18:43:31 +01:00
you-can-calculate-multiple-aggregates-in-a-single-database-query.md Weekly thread #49 2021-12-10 16:25:33 +01:00
you-can-chain-can-to-route-definitions-to-specify-policy-rules.md Add this week's tips 2021-11-12 18:43:31 +01:00
you-can-check-if-a-string-contains-json-by-decoding-it-encoding-it-again-and-comparing-the-value-with-the-original.md Weekly thread #43 2021-10-29 21:16:27 +02:00
you-can-convert-eloquent-collections-back-to-a-query-builder-instance.md Weekly thread #47 2021-11-26 16:21:56 +01:00
you-can-create-dynamic-relationships-this-relationship-is-based-on-a-column-thats-added-using-a-subquery-in-a-scope.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
you-can-create-text-based-tables-in-laravel-even-outside-cli-commands.md Add new tips thread 2021-11-05 17:12:37 +01:00
you-can-explicitly-bind-objects-to-routes-you-dont-have-to-use-route-model-binding-only-custom-objects-work-perfectly-well-too.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
you-can-implement-the-shouldbeencrypted-interface-on-your-jobs-to-encrypt-their-payload-before-they-get-pushed-to-the-queue.md Weekly thread #47 2021-11-26 16:21:56 +01:00
you-can-make-php-throw-an-exception-when-decoding-json-if-the-value-isnt-valid-json.md Weekly thread #43 2021-10-29 21:16:27 +02:00
you-can-make-the-http-client-throw-exceptions-to-terminate-execution-on-any-received-errors.md Fix thread command 2021-10-29 20:45:20 +02:00
you-can-pass-parameters-to-laravel-middleware-classes.md Weekly thread #48 2021-12-03 18:31:27 +01:00
you-can-refactor-cluttered-if-conditions-using-lookup-tables-match-statements-and-switch-statements.md Weekly thread #50 2022-01-07 13:58:01 +01:00
you-can-return-custom-collections-from-eloquent-queries.md Weekly thread #48 2021-12-03 18:31:27 +01:00
you-can-return-false-from-a-ing-eloquent-event-listener-creating-updating-saving-deleting-to-cancel-the-action.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
you-can-return-mailables-as-responses-from-controllers-it-will-show-the-rendered-version-in-the-browser.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
you-can-show-a-link-to-the-previous-page-by-using-url-previous-in-a-blade-view.md Add this week's tips 2021-11-12 18:43:31 +01:00
you-can-use-array-annotations-to-specify-the-available-keys-and-their-value-types-in-php-arrays.md Weekly thread #48 2021-12-03 18:31:27 +01:00
you-can-use-factories-for-generating-any-fake-test-data-by-making-them-use-the-fluent-model.md Add this week's tips 2021-11-12 18:43:31 +01:00
you-can-use-giveconfig-when-using-contextual-binding.md Weekly thread #48 2021-12-03 18:31:27 +01:00
you-can-use-request-whenfilled-to-execute-some-logic-only-when-a-specific-value-is-part-of-the-request-data.md Weekly thread #49 2021-12-10 16:25:33 +01:00
you-can-use-schema-methods-eg-table-or-create-outside-of-migrations.md Weekly thread #46 2021-11-19 16:10:01 +01:00
you-can-use-ternary-operators-like-to-use-dump-or-dd-in-your-short-closures.md Add new tips thread 2021-11-05 17:12:37 +01:00
you-can-use-the-array-spread-syntax-to-pass-an-array-of-arguments-to-another-function.md Weekly thread #50 2022-01-07 13:58:01 +01:00
you-can-use-the-data-get-method-to-safely-access-a-nested-array-value.md Weekly thread #46 2021-11-19 16:10:01 +01:00
you-can-use-the-formanother-form-attribute-on-buttons-to-submit-a-different-form.md Weekly thread #46 2021-11-19 16:10:01 +01:00
you-can-use-the-spread-operator-to-merge-arrays-just-like-in-javascript.md Weekly thread #48 2021-12-03 18:31:27 +01:00
you-can-use-value-to-fetch-a-single-value-from-the-database-without-having-to-instantiate-an-entire-model.md Add new tips thread 2021-11-05 17:12:37 +01:00
you-can-use-valueorfail-to-fetch-a-value-from-the-database-or-abort-the-request-if-the-queried-record-does-not-exist.md Add new tips thread 2021-11-05 17:12:37 +01:00
you-can-use-where-on-rule-instances-without-passing-a-callback.md Fix special character 2021-11-05 17:13:26 +01:00
you-can-use-wherexandy-in-eloquent.md back/forward buttons, fix timestamps in DB 2021-04-07 20:16:47 +02:00
you-can-validate-user-input-inside-middleware.md Weekly thread #48 2021-12-03 18:31:27 +01:00
you-can-validate-values-for-enum-database-columns-using-the-new-enum-validation-rule.md Weekly thread #46 2021-11-19 16:10:01 +01:00