Inflector
final class Inflector (View source)
Path class can help to get the various paths like root folder, stub folder, model folder and so on.
Methods
static string
classify(string $string)
Get Class name as Laravel style.
static string
pluralize(string $string)
Get Class name as hasMany method name.
static string
tableize(string $string)
Get Class name as belongsTo method name.
static string
title(string $string)
get title from Doctrine table
Details
static string
classify(string $string)
Get Class name as Laravel style.
Returns a word in singular form.
static string
pluralize(string $string)
Get Class name as hasMany method name.
Returns a word in plural form.
static string
tableize(string $string)
Get Class name as belongsTo method name.
Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'.
static string
title(string $string)
get title from Doctrine table