Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

How to get the latest and oldest record in Laravel Eloquent through ofMany.

Laravel ships with many awesome and time-saving methods for developers like us.. Here we will see some “One of Many” function’s examples:   Get the latest/last record from a model/relation function latestRecord() { return $this->hasOne(RelationModel::class)->latestOfMany(); } Get the oldest/first record from a model/relation function latestRecord() { return $this->hasOne(RelationModel::class)->oldestOfMany(); }   Bonus!: Retrieve records with special […]

Disable chrome extension’s JS when debugging in development tools

While I was debugging a vuejs application, I got so many unnecessary steps for the chrome extension’s JS file that it took a lot of time to debug. And I need those extensions too for my development and regular work. So I was looking for a solution that how to disable or bypass the extension’s […]

How to get or export SQL query from Laravel migration file?

Hey there.. hope you are facing the same problem as I am facing to update the DB from phpMyAdmin.. and no ssh access from Cpanel to run the migration command on the terminal. And you are in the right place.. here is the solution to get the dump query from the Laravel migration file. Command: […]

Validate Bad Email Address in PHP, Laravel

Hey! what’s up? I am working on a SAAS application for my current company and facing the issue of sending emails, actually bad emails, those comply with the RFC. So that means basic email validation is not working from the Laravel side and we are processing emails to ‘example@gmail’ like email addresses (yes RFC allow […]

Setup domain in Apache server on AWS EC2 and DigitalOcean Cloud

I am trying to set-up domains in the Apache server on AWS EC2 and DigitalOcean cloud’s Ubuntu instances and summarize this information after completing the task for my future reference. If this information helps you also, it will be my pleasure and you can let me know that in a comment below. 🙂 BTW, You […]

Wordpress Social Share Plugin powered by Ultimatelysocial