so i was working and i intuitively typed this just before the break
use Carousel\Carousel;
class FyStories
{
protected Carousel $carousel;
public function __construct()
{
$this->carousel = new Carousel();
}
}
i came back and i didn't understand what's the difference between
protected Carousel $carousel;
and this
public function __construct()
{
$this->carousel = new Carousel();
}
i know a construct is where you set everything you want to be initialized within the class; but are the first piece of code and the second the same thing are they different how do the first protected Carousel $carousel
do ??