The answers are right. This is based on your distance from portal when deploying.
What the others did not says, why is it important, and how should to build your portal to be the most effective.
Here is a site, when you can simulate an attack, and you can set the distance where from you fire: http://ipas.graphracer.com/
When all the resonators are close to the center, a little (eg. lv5) XMP can be damage more, if the attacker stands center.
But if the resonators are far from center, if you check the heatmap, lv5 damages very little, because of it range. So you can imagine, that if you build it far as you can, portal will be "stronger", harder to destroy.
Ok, but what else? Here is a trick: experienced players deploys one resonator really close to the center. But why, if it will destroy soon? Because of Ultra strikes. Ultra strikes are really really strong weapons, but focused on a very little area. If you have an important portal, what your faction needs to hold, and there are 4 AXA shields in it, but an attacker stands to very center of the portal and starts with ultra strikes to destroy AXA shields, you won't get notification about attack, because US does not reach any resonators.
But if one resonators close to the portal, you get the notification.
Is there any more? Yes. How to build a portal? When it is empty, the best way (usual), if you deploy a lvl8 into a slot, the lvl7 the opposite side, and so on.
For example: 8 to north, 7 to south, 6 to east, 6 west, 5 north east, 5 south west, 4-4 into the rest. This is because of heatmap. If 8766 are close to each ohther, attacker won't stand to the center of portal, but to the center where the most damage caused for these higher level resonators, and the "wind of attack" will care about little ones. So you have more chance to hold a portal with recharge, if you build as I mentioned.