@BPJSKesehatanRI selamat siang min, min ayah, ibu dan ipar saya awalnya PBI tapi sekarang hanya ibu saya yang pbi. Jika mau dirubah ke mandiri apakah ibu saya juga masuk min? PBI nya hilang ?
@pln_123 Min saya mau isi token, tapi kok no pelanggan tidak sesuai sudah saya coba dr kemarin. Listrik rumah saya sudah mau habis ini no meternya 24125169706
#Laravel Tip
You can create custom disks at runtime without the need to have the config in your config/filesystems file.
This can be handy to manage files in custom paths.
💡 If you're running PHP or Laravel apps in production you're probably using nginx and php-fpm.
But do you actually know what these terms mean?
- CGI
- FastCGI
- php-fpm
- How do they connect to nginx?
Let's find out!
🧵 Keep Reading
#Livewire Tip
Did you know... you can call your Livewire component's methods directly from your javascript code?
It's easy to implement using listeners. For ex. when you have third-party events, such as barcode scan or location detection event and you want to pass data.👇
#Laravel tip:
Optimize Your SQL Queries with Eager Loading Constraints
Eager loading can drastically reduce the number of database queries. However, if you only need specific columns or filtered data from a relationship, adding constraints will optimize the query.
Use constraints while eager loading:
#Laravel tip:
Optimize Middleware with Middleware Groups
Instead of applying multiple middlewares to routes individually, use middleware groups to combine related middleware into a single set for easy assignment.
Define middleware groups in Kernel.php:
#Laravel tip:
Use Eloquent’s ‘HasManyThrough’ for Complex Relationships.
In complex applications, you may need to retrieve data through intermediary models. Laravel’s HasManyThrough relationship makes it easy to define and query such data.
Set up a HasManyThrough relationship:
Temen-temen.. Klo nanti misal anak kalian kelak nanya ke bapaknya "pak, Allah ada di mana?" itu pemahaman yg mudah dicerna sm anak gimana ya? pertanyaan simple, tp berpengaruh sm akhlak&tauhidnya kelak
#Laravel tip:
Use count() for Quick Collection Length Checks.
Instead of checking if a collection is empty using count(), you can use ‘isNotEmpty()’ or ‘isEmpty()’, which are optimized methods for checking whether a collection has data.
Use isNotEmpty() or isEmpty() to check if a collection contains data:
#Laravel tip:
Use Route Groups with Prefixes and Middleware for Cleaner, Modular Code
Organizing related routes under a common prefix and middleware makes your route files easier to navigate and secures groups of routes.
Group routes by prefix and middleware:
Laravel Tip 💡: The "toggle" method
At some point, we all needed to toggle a value, for example, a "like" feature that switches between states. While you can do it manually, Laravel ships with a "toggle" method to do exactly that 🚀
#laravel