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 […]

Change or set php-cli version in Ubuntu

Hey, So you also face the same issue! Hope you will get a solution here.. BOL! Check the current PHP version.  php –version In my case, it is php7.1. Now, check the excepted version that you want to set/change in folder ls -la /usr/bin/ You will get a list of files and folders, now check […]

How to Upgrade phpMyAdmin manually?

I am using PHP7.2 for one of my projects and facing compatibility issues while working in phpMyAdmin 4.6. I do some Google and find out a solution. So in this article, we will go through the process of how to upgrade phpMyAdmin 4.6 to 4.9 to solve the issue. The issue/warning we are facing: Warning […]

Create and access multiple ports for Apache on Amazon EC2(aka AWSEC2) or DigitalOcean

We can do this by using the virtual host. There is two part to complete to open and configure the ports. I used port 8080 but you can use any port that is not using for any service.   Part 1: Add/Update Virtual Host Navigate to the sites-available directory for the configuration file cd /etc/apache2/sites-available/ […]

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 […]

Update (custom) XAMPP/WAMP/LAMP default landing page layout

We are building website and applications on localhost and I use XAMPP package on Linux for my local development.   After installing Xampp, we always get a default home page from Xampp and most of the time we don’t need that. Basically before writing this article I always delete all items of htdocs/www folder, but […]

Wordpress Social Share Plugin powered by Ultimatelysocial

Remote PHP, Laravel, LAMP developer experience in Oracle Service Cloud

Hi, You can subscribe to get emails
about technology hacks, tools and many more.