PHP Build a REST API with Laravel Seeding the Database Creating Models and Migrations

Caelan Curry
Caelan Curry
2,896 Points

What does "::class" refer to when creating the model relationship?

From what I understand, the double colon is used to access a model's static property. When creating a model relationship such as:

public function author(){ return $this->belongsTo(Author::class); }

I assume "class" is a static property set in the "Model" model that extends Author. However I can't find the definition of class, so I am unsure what exactly it means.