It is generally recommended to explicitly declare the visibility for methods.
Adding explicit visibility (private, protected, or public) is generally
recommend to communicate to other developers how, and from where this method
is intended to be used.
Loading history...
21
{
22
$this->migrator = $DbMigrations;
23
$this->seeder = $DbSeeding;
24
}
25
26
/**
27
* Create migrations from the given DB
28
* @param String null $database
29
* @return $this
30
*/
31
public function migrate($database = null)
32
{
33
$this->migrator->convert($database)->write();
34
35
return $this;
36
}
37
38
/**
39
* @param null $database
40
* @return $this
41
*/
42
public function seed($database = null)
43
{
44
$this->seeder->convert($database)->write();
45
46
return $this;
47
}
48
49
/**
50
* Helper function to generate the migration and the seed in one command
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.