![Why Cloudways is the Perfect Managed Hosting for PHP Applications](https://images.ctfassets.net/vzl5fkwyme3u/3VLCUBagZPfSLyxyt1AvvP/89e3b904a450454545eb885e2e0e76b4/cloudways.jpg?w=1000)
#### The following is a sponsored blogpost by [Cloudways](https://www.cloudways.com/en/?id=431739)
Developing an application is not the sole thing you should bank on. You must strive to find the best hosting solution to deploy that application also. The application’s speed is dependent on the hosting provider, that is why I always advise you to go for the best hosting solution to get the ultimate app performance.
Now a days, it is a big challenge to choose any web hosting, as each hosting has its own pros and cons which you must know, before considering it finally for the deployment. I don’t recommend shared hosting for PHP/Laravel based applications, because you always get lot of server hassles like downtime, hacking, 500 errors, lousy support and other ...
![Implement Web Push Notification in PHP using W3C provided Notification API](https://images.ctfassets.net/vzl5fkwyme3u/ERmW7y6S781gcWIiFjTRn/de1c1aeb3c79093210828760fc373ab2/AdobeStock_152541972.png?w=1000)
I am sharing you the simple steps by which you can broadcast the web push notifications to your subscriber. In this tutorial we are making a subscriber form and saving information using Ajax and PHP and then through a server side code returning response to current logged in user and showing notification to that user.
**Following are the steps to build this system**
#### 1. Create a database, I am creating db with name 'web_notifications'
Creating subscribers and notifications tables using following sql statements
CREATE TABLE IF NOT EXISTS `subscribers` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
![Laravel Eloquent Relationship Part 1](https://images.ctfassets.net/vzl5fkwyme3u/2iNUlfYJ8SZVYUSemRAszt/eeb78994b12f1491f654d77026ab6c33/AdobeStock_199075029.png?w=1000)
Laravel introduces eloquent relationships from laravel 5.0 onwards. We all know, while we creating an application we all have foreign keys. Each table will be connected to some other. Eloquent make easy to connect each tables easily. Here we will One to one, one to many and many to many relationships. Here we will see three types of relationships,
1. One to one relationships
2. One to many relationships
3. Many to many relationships
## Why Eloquent Relationships
Here we have 2 tables, students and marks, so for join each table,
$student = student::join(‘marks’,’marks.student_id,’=’,students.id’)->where(‘students.id’,’1’)->get();
the above query is to l...
![Create Alarm and Monitoring on Custom Memory and Disk Metrics for Amazon EC2](https://images.ctfassets.net/vzl5fkwyme3u/2HgdCq2lZucMyuiYyYiQie/b7376c29a2f94799613e8c1cb8ff4d3b/AdobeStock_91111530.jpeg?w=1000)
Today I am going write a blog on how to Monitor Memory and Disk custom metrics and creating alarm in Ubuntu.
To do this, we can use Amazon CloudWatch, which provides a flexible, scalable and reliable solution for monitoring our server.
Amazon Cloud Watch will allow us to collect the custom metrics from our applications that we will monitor to troubleshoot any issues, spot trends, and configure operational performance. CloudWatch functions display alarms, graphs, custom metrics data and including statistics.
## Installing the Scripts
Before we start installing the scripts for monitoring, we should install all the dependent packages need to perform on Ubuntu.
First login to your AWS server, and from...