I know that this is a common question but the questions I've seen (about 10) confused even more than I've been.
My questions are included in the code as comments.
I have a class with three fields
public class Model
{
public $prop1;
public $prop2;
public $prop3;
public function _construct($params) // doubt 1: Do I have to pass an array to a constructor, can't I pass the parameters individually
{
// doubt 2: How to assign the value to the instance variables
}
}
$model = new \App\Model($whatToPuthere); //doubt 3: How to provide the constructor parameters