🚀 Laravel / PHP Tips | YouTube: https://t.co/ORdNufCN8d | Blogs: https://t.co/yc2lXv5Vdd
🤝 Our dev team is open for outsourcing partnerships! DM open.Joined December 2020
TIL about the intended() which sends users to their originally requested page after authentication, or to '/fallback' if no previous URL.
redirect()->intended('/fallback');
Great for maintaining user flow after login!
Did you know that Laravel Artisan command has table method to output data.
👉 Cleaner, more readable output
👉 Automatic column alignment
👉 Easy to scan and compare data
👉 Professional-looking results
Have you tried Str::slug method in Laravel?
👉 It handles multiple spaces
👉 It handles special characters
👉 It also handles other languages.
🔥 You can also specify the separator and language other than english.
"avoid using else" is one of the interesting tips for writing clean code. We cann't fully avoid it but remove un-necessary else.
In following code, we can even simplify using ternary operator.
TIL that Laravel uses bcrypt for hashing the password by default. The hashed password is always 60 char long and always starts with $2y$.
Came across following code which was used to check whether Password is hashed.
Str::after() in Laravel makes code cleaner and more intuitive.
Same code using raw PHP involves using multiple methods and some gymnastics with substr() and strpos().
Be specific with your database queries!
👉Use select() to fetch only the columns you need,
👉You can even do this for related Model.
🔥Laravel also provides a alternate short-cut for selecting related Model column.
Checking if a string starts with a specific substring? Ditch strpos() === 0. Laravel's Str::startsWith() or PHP 8's str_starts_with() have got you covered!
I'm excited to announce that Laravel has raised a $57M Series A in partnership with Accel.
I believe that Laravel is the most productive way to build full-stack web applications, and Laravel Cloud will be the platform for shipping those applications that this community deserves.
Catch N+1 Query Issues in your Laravel App.
👉Instantly alerts you to potential performance issues. 👉Forces efficient eager loading
👉Helps maintain performant code as your app grows
Make sure to only enable it in Development Mode.
Scopes in Laravel are used to add constraint to the query using where conditions.
But did you know that you can use them to encapsulate 'with' relationships too!
Laravel makes it so easy to fetch a Record using a column other than the primary key.
For those new to Laravel, this feature is known as Route Model Binding.
Eloquent has the increment() method to increase the value of a column.
👉 Can increment by a specific value.
👉 Works with Decimal as well.
👉 Its Atomic as no need to fetch Model.
👉 Can update other columns simultaneously.
🔥There is also a decrement() method.
65K Followers 505 FollowingPHP developer at @spatie_be, built @getmailcoach, https://t.co/IRUtuG0FwZ, @ohdearapp and @flareappio, blogging at https://t.co/a3spVy88VN
16 Followers 498 FollowingWe provide IT service ...
Custom Website Development
Custom Application Development
Useable Coding Component
Sale Full Project APP & Website
DM Inquirey
8 Followers 29 FollowingBackend Developer specialized in PHP and Laravel. Experienced in WordPress customization, building dynamic interfaces with Tailwind CSS, Livewire, and AJAX. Ski
5 Followers 114 FollowingOpen-source Laravel + Inertia.js Admin Panel for the dev, by the dev @_skpaul82
#buildinpublic #buildfordev #laravel #inertiajs
Follow for daily updates 👇
60K Followers 413 Following~20 yrs in web-dev, now mostly Laravel.
My Laravel courses: https://t.co/HRUAJdMRZL
My Youtube channel: https://t.co/qPQAkaov2F
65K Followers 505 FollowingPHP developer at @spatie_be, built @getmailcoach, https://t.co/IRUtuG0FwZ, @ohdearapp and @flareappio, blogging at https://t.co/a3spVy88VN
67K Followers 856 FollowingBuilding https://t.co/JvEOgCz8Dl, https://t.co/HbdEOha0kX, https://t.co/vuTdNhyRXo, NativePHP, and other tools for devs. Follow my product dev journey. CTO at @beyondcode
16K Followers 72 FollowingI’m JMac. I build things with my hands like @laravelshift, https://t.co/4NmhaccU6f, https://t.co/KSW6jSIOFD, and my standing desk.
7K Followers 4 FollowingAutomated and human services for upgrading your @laravelphp projects, with even more automation to keep your code modern. Email support for faster responses.
5K Followers 345 FollowingCTO by day 👨💻 • Creator by night (formerly @pingpingio) 🚧 • Author 📚 • Speaker and Consultant 🗣️ • Firefighter 🚒 • Student Pilot 👨✈️