Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Create Command To Generate All Models #46
referenced this pull request
Oct 21, 2018
@tprj29 I would suggest using
It requires doctrine/dbal, but that's already used.
That way you get string
Also, instead of
$className = Str::camel(Str::singular($table)); $className = ucfirst($className);
I would use simple:
use Doctrine\Common\Inflector\Inflector; $className = Inflector::classify(Str::singular($table));
Str::camel() calls Inflector::camelize() which calls Inflector::classify() and performs lcfirst() on returned value.