If you think about it, both Sanji and Luffy had both mentors who made great sacrifices for them (Shanks gave up his left arm to save Luffy, and Zeff gave up his right leg for Sanji), and ultimately gave them the motivation and the purpose to believe that they could achieve their dream.
Sanji understands Luffy’s personality to the point that he rarely shows shock or surprise at Luffy’s outrageous actions and decisions. In fact, he is often one of the people to assure the rest of the crew or other people that Luffy knows what he is doing which proves his leadership. In Thriller Bark, Sanji volunteered to give his life in exchange for Luffy’s when Sanji was standing next to Zoro, but was ultimately stopped by Zoro. After that, Brook acknowledging their will of sacrifice.
When Bege stated the crew would fall under Big Mom’s wing via Sanji marriage to Pudding, Sanji ferociously rejected the idea, saying that Luffy would never bow to anyone else. And even boldly stating like Zoro before him that “Luffy will become the Pirate King”, which angering Bege.
Sanji and Luffy have a great trust in each other as seen most recently when Luffy trusted Sanji to fight off Big Mom and travel all the way to Zou while protecting Caesar, Momonosuke and the rest of the crew from all danger. Sanji succeeded and Luffy was confident Sanji could look after himself even when the cook was missing from Zou, but Luffy became concerned when he learnt that Sanji had gotten entangled in a Yonko’s political plans, and decided to go retrieve him from his “wedding” to Pudding.
When Cracker told Luffy that Sanji would most likely be happy with the Charlotte Family and turn away from the Straw Hats, Luffy angrily attacked him telling him not to put words in Sanji’s mouth. When Sanji actually said what Cracker said to Luffy, directly, after violently kicking Luffy off the Cat Carriage, and then telling him to begone, Luffy immediately expressed his doubt over Sanji’s words as being sincere.
Luffy then opted to not defend himself or run away when Sanji proceeded to beat him without mercy, and after being defeated, Luffy brings Sanji to tears when he expresses that he will still not turn his back on him. Luffy declared his dedication to Sanji and refused to move on without him on his journey and eating anything other then Sanji’s cooking, while at the same time declaring Sanji’s bigoted comments as forced and fake. Luffy claimed he can’t become the Pirate King without Sanji which highlights how crucial and important Sanji is to the crew.
Later after he and Nami were captured and Pudding came to their cell, she whispered the truth to Luffy that she was planning to kill Sanji at their wedding (as well as him and Nami later), Luffy became further enraged and was determined to break free to protect his friend, even willing to rip off both his arms to escape.
After being freed by Jinbe, while storming the palace, Luffy was found by Reiju, who informed him that Sanji has become aware of Pudding’s true nature, much to Luffy’s relief. Luffy then learns the reason for Sanji’s actions before returning to the place where Luffy promised to wait for Sanji. In the same way, Sanji could not forgo his care for his captain, as when Bobbin tried to eat the Meat (meant for Luffy) from Sanji’s Bento box, Sanji became enraged and kicked down the pirate- inadvertently risking Zeff's life in process.
This worth noting as Sanji almost never denies anybody food, but cared more for his starving captain than keeping his deal with the Big Mom Pirates. Sanji traveled through Sweet City and soon found his captain at the spot that he promised to meet with him which brought to his face. And it's probably one of the most emotional scene ever.
Just as he did with Nami and Chopper at Punk Hazard, Luffy understood when a decision was important to Sanji, and decided to support that decision. When Sanji stated that he could not leave Whole Cake Island with Luffy after learning of Big Mom’s plot to assassinate his family, Luffy responded simply that was who Sanji was, and that he and the Straw Hats would help Sanji wreck Big Mom’s plans.
Luffy helps Sanji going through the darkest time of all
Tear is falling into my eyes right now
So yeah, that's my opinion about the relationship between Luffy and Sanji.
If you have any question then you can always reply to me.
#Bromance