Rewrite conditional statement
If you have a lot of conditions I recommend you to use an HashMap (associative array in php) to store the conditions, like this : 

$notificationsItems = [
    "All" =&gt; "AllNotification",
    "Accept" =&gt; "AcceptTrackRequest",
    "Deny" =&gt; "DenyTrackRequest"
];


When you have your pair, you can test all the conditions through a simple foreach: 

foreach ($notificationsItems as $postValue =&gt; $objectAttr) {
    if ($_POST["item"] == $postValue) {
        $notificatioSetting-&gt;{$objectAttr} = $_POST["status"];
        break; //we make an early termination
    }
}


This version mimic exactly the elseifcode. As itzmukeshy7 put in his response, there is a solution with fewer lines of code :

if(in_array($_POST["item"], $notificationsItems)) {
    $notificationSetting-&gt;{$notificationsItems[$_POST["item"]]} = $_POST["status"];
}


In this way adding more conditions will be really easy while making the code more extensible and more decoupled. In addition you'll make explicit the association between a post value and the corresponding attribute in the object, which is good for your futur self or colleague(s).