But there are multiple reasons I choose Symfony 4 over Laravel.
And if you want a code comparison then this small example:
Laravel:
class User
{
}
Symfony: class User
{
private $id;
private $name;
public function getId():?int
{
return $this->id;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getName():?string
{
return $this->name;
}
}
Laravel looks a lot easier and quicker. And it is.
But good luck next month when you can't remember what properties User has. Your IDE can't autocomplete it. And also good luck working with a team. Your team members have to look up the database model for the User to see what properties are available.And this is happening in Laravel all the time. Very quick, very easy, a lot of magic but it will bite you in the end.