프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$blueprint | Illuminate\Database\Schema\Blueprint | The Blueprint instance. | |
$filesystem | Illuminate\Filesystem\Filesystem | The Filesystem instance. |
메소드 | 설명 | |
---|---|---|
__construct ( ) | New instance | |
getColumnIndexes ( ) : array | Get an array of valid column indexes | |
getColumnModifiers ( ) : array | Get an array of column modifiers from the MySqlGrammar::modifiers property | |
isValidColumnType ( string $type ) : boolean | Checks if supplied string argument is a valid column type | |
jsonFileToArray ( string $path ) : array | Grabs a json file and returns a array | |
parseProperty ( string $type ) : string | Parses the property without the parameters in this method, "string" and "string(50)" should both return as "string" | |
parseSchema ( array $data, array $only = [] ) : array | Parses the schema from the json array into a readable format laravel generators extended understand | |
setMigrationName ( string $tableName ) : string | Creates a migration name from a table name or keeps it intact if a migration name has already been set | |
validateSchema ( array $data ) : array | Validates the schema from the json array and returns an error of syntax errors if any are found |
public getColumnIndexes ( ) : array | ||
리턴 | array | list of the possible column indexes |
public getColumnModifiers ( ) : array | ||
리턴 | array | Example: unsigned, charset, collate, ... |
public isValidColumnType ( string $type ) : boolean | ||
$type | string | Example: string, integer, text, timestamp, etc |
리턴 | boolean | Returns true if valid, otherwise false |
public jsonFileToArray ( string $path ) : array | ||
$path | string | The path to the json file |
리턴 | array | The parsed array |
public parseProperty ( string $type ) : string | ||
$type | string | Example: "string", "string(50)", etc |
리턴 | string | the parsed column type name |
public setMigrationName ( string $tableName ) : string | ||
$tableName | string | The original table name (Example: users, cats, create_users_table) |
리턴 | string | The migration name |
public validateSchema ( array $data ) : array | ||
$data | array | The array containing the json output from file |
리턴 | array | Any errors identified for every field schema |
protected Blueprint,Illuminate\Database\Schema $blueprint | ||
리턴 | Illuminate\Database\Schema\Blueprint |