Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There is no argument given that corresponds to the required formal parameter

There is no argument given that corresponds to the required formal parameter

I don't have any idea about this error please how I make that work?

like image 830
Fatihi Youssef Avatar asked Oct 28 '25 01:10

Fatihi Youssef


1 Answers

The error appears because the base class does not have a default constructor. You need to define a constructor in the derived class, which gets the same parameters as the constructor in the base class, and invokes that base class constructor using the base keyword as explained here

like image 89
Adi Levin Avatar answered Oct 30 '25 17:10

Adi Levin