How to use custom class in Laravel without creating object new Class()?
As sample, I have class Exception I include this like as:
use App\Exception
After in custom class User I can do:
use App\Exception
class User {
public function check(Exception $e) {
//
}
}
Is it right?
Or I need to create object $e = new Exception() in constructor?
Whats is difference between these kind of initialization?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire