Define relationships outside of Eloquent models in Laravel
August 24, 2020 — You might be aware of the typical way of defining model relationships in Laravel Eloquent. i.e inside of the models itself.
A blog on PHP, JavaScript, and more
August 24, 2020 — You might be aware of the typical way of defining model relationships in Laravel Eloquent. i.e inside of the models itself.
August 22, 2020 — Recently, I needed to change some design elements of a site when the site is in the fullscreen mode. So, I was looking for a way to it using CSS as all I wanted to change was hiding some stuff when in the fullscreen mode.
August 20, 2020 — There comes a time when you want to fetch the number of records for a child relationship along with the main Eloquent query.
August 19, 2020 — There are two ways of many using which you can loop over the iterables in JavaScript.
August 17, 2020 — One of the many ways using which you can insert records (or seed your database) is by using the seeder classes which extend a base class called Illuminate\Database\Seeder
in Laravel.
August 14, 2020 — Before proceeding on describing all the customizations I made, I have a confession to make.
August 13, 2020 — The other day, I was looking for a way using which I can reload my local Jekyll instance every time I make some changes into the files.
August 12, 2020 — Recently, I’ve been working on a Laravel app and one of my friends wanted to see it in action who’s sitting seven ocean apart. But, I didn’t have an actual server to host it and to make it accessible for my friend. And so, I was looking for a tool/API which can expose my local website instance to the internet.
August 11, 2020 — In PHP, the visibility of a property, a method, or a constant can be defined by prefixing the declaration using keywords public
, protected
or private
. Here is how these modifiers work.
August 10, 2020 — When writing MySQL queries, if there are more than two where conditions, you’d want to group certain constraints/conditions to avoid unexpected behavior. For instance, check the following query.