I want to display the text in the blade as html. To do this, I used this code in the controller section:
class MessageController{
public function customText($color): string
{
return '<p style="color: '. $color . '"><strong>Lorem</strong> ipsum dolor <img src="images/image.jpg"></p>';
}
public function show(){
return view('1.blade',[
'message' => $this->customText('#fff')
]);
}
}
Now how can I function the same code above in blade ?
For example, I want it to be like this:
{{message('#000')}}