I'm learning about Laravel
and I was intrigued to know how a part of the framework
code for Seeder
works and the question is about the following code:
public function run()
{
Categoria::insert(['nome'=>'Dúvidas','descricao'=>'Tire suas dúvidas agora mesmo!']);
Categoria::insert(['nome'=>'Sugestões','descricao'=>'Gostaria de sugerir algo?']);
Categoria::insert(['nome'=>'Outros','descricao'=>'Qualquer outro tipo de assunto']);
}
How and where does Laravel
redirect the execution of this code?
About what I know of PHP
, this is a call to a static function in the Categoria
class, but there is no insert
method in this class.
If you have website tips and books about Laravel
you will be of good help ( PT preference).