diff --git a/laravel/cli/tasks/migrate/resolver.php b/laravel/cli/tasks/migrate/resolver.php index f139195c..0e144b4a 100644 --- a/laravel/cli/tasks/migrate/resolver.php +++ b/laravel/cli/tasks/migrate/resolver.php @@ -116,7 +116,7 @@ class Resolver { // naming collisions with other bundle's migrations. $prefix = Bundle::class_prefix($bundle); - $class = $prefix.substr($name, 18); + $class = $prefix.\Laravel\Str::classify(substr($name, 18)); $migration = new $class; diff --git a/laravel/database/eloquent/model.php b/laravel/database/eloquent/model.php index d9c88396..966a00c4 100644 --- a/laravel/database/eloquent/model.php +++ b/laravel/database/eloquent/model.php @@ -465,7 +465,7 @@ abstract class Model { */ public function table() { - return static::$table ?: strtolower(Str::plural(basename(get_class($this)))); + return static::$table ?: strtolower(Str::plural(class_basename($this))); } /** diff --git a/laravel/database/eloquent/relationships/has_many_and_belongs_to.php b/laravel/database/eloquent/relationships/has_many_and_belongs_to.php index 7453a02f..9fecb66d 100644 --- a/laravel/database/eloquent/relationships/has_many_and_belongs_to.php +++ b/laravel/database/eloquent/relationships/has_many_and_belongs_to.php @@ -21,7 +21,7 @@ class Has_Many_And_Belongs_To extends Relationship { protected $other; /** - * The columns on the joining tbale that should be fetched. + * The columns on the joining table that should be fetched. * * @var array */ diff --git a/laravel/validator.php b/laravel/validator.php index b238ce13..b18bf512 100644 --- a/laravel/validator.php +++ b/laravel/validator.php @@ -559,7 +559,7 @@ class Validator { protected function validate_active_url($attribute, $value) { $url = str_replace(array('http://', 'https://', 'ftp://'), '', Str::lower($value)); - + return checkdnsrr($url); } @@ -608,7 +608,7 @@ class Validator { */ protected function validate_alpha_dash($attribute, $value) { - return preg_match('/^([-a-z0-9_-])+$/i', $value); + return preg_match('/^([-a-z0-9_-])+$/i', $value); } /** @@ -657,7 +657,7 @@ class Validator { protected function validate_before($attribute, $value, $parameters) { return (strtotime($value) < strtotime($parameters[0])); - } + } /** * Validate the date is after a given date. @@ -670,7 +670,7 @@ class Validator { protected function validate_after($attribute, $value, $parameters) { return (strtotime($value) > strtotime($parameters[0])); - } + } /** * Get the proper error message for an attribute and rule. @@ -692,7 +692,7 @@ class Validator { { return $this->messages[$custom]; } - elseif (Lang::has($custom = "validation.custom.{$custom}", $this->language)) + elseif (Lang::has($custom = "{$bundle}validation.custom.{$custom}", $this->language)) { return Lang::line($custom)->get($this->language); } @@ -753,7 +753,7 @@ class Validator { $line = 'string'; } - return Lang::line("{$bundle}validation.{$rule}.{$line}")->get($this->language); + return Lang::line("{$bundle}validation.{$rule}.{$line}")->get($this->language); } /** @@ -929,7 +929,7 @@ class Validator { protected function replace_after($message, $attribute, $rule, $parameters) { return str_replace(':date', $parameters[0], $message); - } + } /** * Get the displayable name for a given attribute. @@ -988,7 +988,7 @@ class Validator { { $parameters = array(); - // The format for specifying validation rules and parameters follows a + // The format for specifying validation rules and parameters follows a // {rule}:{parameters} formatting convention. For instance, the rule // "max:3" specifies that the value may only be 3 characters long. if (($colon = strpos($rule, ':')) !== false)