{ Laravel snippets }

Christoph Rumpel  🤠

Christoph Rumpel 🤠 @christophrumpel

🧙‍♂️ Laravel Nova When you allow a user role to see a relationship field, it will also be visible in Nova's sidebar as a resource which is not always what you want. Just learned two ways to change it. With the method, you can also define a condition yourself. thx @tillkruss https://t.co/4YoFbtsZur

Taylor Otwell ⚗️

Taylor Otwell ⚗️ @taylorotwell

🔥 Tip: sometimes I want to perform a quick validation check outside of the normal “Validator” flow and then respond with the same HTTP response format the validator would use. You can easily do this using “ValidationException::withMessages()”… #HiddenGem https://t.co/1Du0e8yrSH

Andrew Schmelyun

Andrew Schmelyun @aschmelyun

Whenever I'm doing validation in my #Laravel projects, I've started to create static functions in the relevant models and dump the validation rules there. Everything's in one easy-to-find place! https://t.co/StGoW7GeIb