
Web Development Instructor | JuanDMeGon @JuanDMeGon
In Laravel, you can explicitly indicate the locale to translate a given element. https://t.co/TCRLh1uSqO
Web Development Instructor | JuanDMeGon @JuanDMeGon
In Laravel, you can explicitly indicate the locale to translate a given element. https://t.co/TCRLh1uSqO
Michael Dyrynda @michaeldyrynda
🧐 The @laravelphp docs are a fantastic resource to read over from time to time, given how often new features are added to the framework. ❓Did you know you can add a public shouldQueue method on your job to determine if the job actually *needs* to be queued? https://t.co/9E1uIrmugK
Codecourse @teamcodecourse
🔥 If you're allowing a ?perPage= query param to be specified for your pagination results, LIMIT it! Particularly if you have a huge number of potential records. You can do this easily with the native min() PHP function. https://t.co/aNW7K09Zdt
Liam Hammett @LiamHammett
🔥 Sometimes, when using factories to seed random data, I might use a little random check to use an existing model for some relationships so not everything ends up creating new models for its own relations. It helps seeded data feel a lot more realistic to use. https://t.co/4GboYEfmcM
Tim MacDonald @timacdonald87
🍭 You can utilise the Illuminate\Support Str + Arr classes in views without importing them No need to reach for a fully qualified name or the str_ / arr_ helpers They are defined as an alias in config/app.php which makes them available in the root namespace They just work™️ https://t.co/gUcutOebUL
Laravel Daily @DailyLaravel
#Laravel tip of the day: if you use Model Observers, and want to update some model and prevent observer from being fired again, you can use Eloquent method $model->saveQuietly(); https://t.co/tMWYznYv5B
Laravel Daily @DailyLaravel
#Laravel tip of the day: when seeding data with Faker, you can change locale in config/app.php and it would generate phone numbers and street addresses specific for that region. Read more in the official docs: https://t.co/eCfSilhyhH https://t.co/cjdrsUgGgk
Patrick Brouwers @patrickbrouwers
🚀 Pipelines in Laravel are a nice way of breaking up a sequential process into reusable blocks. #laravel https://t.co/SLNOLh6DTa
Barry vd. Heuvel @barryvdh
With the new Telescope release, you can easily send Slack notifications for Exceptions with a direct link to Telescope, using the new Telescope::afterStoring() hook. Makes it even easier to track down the context of the error 💡 https://t.co/wTKwcloN44 https://t.co/uC2Pq6Qbgh
Liam Hammett @LiamHammett
🔥 I often find myself keeping validation rules in a method on the model. This lets me reuse them wherever I may need - including in controllers or form requests. https://t.co/QDjYFEN2vM
Orlando Charles @_orlandocharles
#Laravel tip: There is a way to make your seeders faster so you don't waste so much time inserting the data into your database, you only need to do a single query. check it out! https://t.co/WxskqWlklQ
Andrew Schmelyun @aschmelyun
Me: *dreads having to rename a database table in my code* Laravel documentation:✨ It's just Schema::rename('old_name', 'new_name') my dude ✨
Laravel Daily @DailyLaravel
#Laravel tip of the day: if you want to have active/inactive (or, in other words, banned/suspended) users in your database, just add this method into your LoginController, it will act like a Middleware. https://t.co/BiMhzFIElF
Jason McCreary @gonedark
🔥 Controllers often have the most code as they contain all the business logic. By leveraging native components and expressive methods, we can streamline our controllers while also improving readability. A huge win. Here are some examples of reducing common blocks of code: https://t.co/ZCZXG4iAqa
Laravel Daily @DailyLaravel
#Laravel tip of the day: if you want to change default validation error message for specific field and specific validation rule, just add a messages() method into your FormRequest class. Read more in the official docs: https://t.co/CHNA33VcW7 https://t.co/l0BINfIQwy
Placebo Domingo @brbcoding
🔥 TIL @laravelphp 7.0 adds 2 new convenient Blueprint methods for migrations: $table->id(); $table->foreignId('foreign_id'); https://t.co/GSLQw0KrUl https://t.co/VD3zcOA4v8
Joren Van Hocht @jorenvanhocht
🔥Tip: easily test if a message was logged or an exception was reported within Laravel using the build in log handler https://t.co/yZhruHFYxQ
Lasse @LasseRafn
🥳! Time to upgrade and make those code-bases prettier! https://t.co/PmUZEhz6dm
Jason Beggs @jasonlbeggs
🔥 Reminder: When testing with Laravel, you can use the from() method to automatically set a referer url. This allows you to test redirects that use the redirect()->back() helper. https://t.co/1ny0hrAY2c
Raul @rcubitto
TIL: you can use Carbon's translatedFormat() instead of format() to translate the formatted string. https://t.co/ZVbCtHwE3F