I am new to Laravel and as I was watching beginner's course of Laravel an author used protected in a model that he created. Here is the code:
class PostsAdmin extends Model
{
protected $table='posts';
protected $primaryKey='id';
}
So, it is unclear for me why to use protected in above cases. Guys I understand the meaning of protected but I cannot understand why protected is used in model in Laravel .