When all the Israelites in the valley saw that the army had fled and that Saul and his sons had died, they abandoned their cities and ran away. So the Philistines came and occupied their cities.
So David left Asaph and his brothers there before the ark of the covenant of the LORD, to minister there regularly according to the daily requirements,
וַיַּֽעֲזָב־way·ya·‘ă·zāḇ-So David leftConj-w | V-Qal-ConsecImperf-3msH5800
As for you, Solomon my son, know the God of your father and serve Him wholeheartedly and with a willing mind, for the LORD searches every heart and understands the intent of every thought. If you seek Him, He will be found by you; but if you forsake Him, He will reject you forever.
David also said to Solomon his son, “Be strong and courageous, and do it. Do not be afraid or discouraged, for the LORD God, my God, is with you. He will neither fail you nor forsake you before all the work for the service of the house of the LORD is finished.