In Laravel 4 there's a dateTime()
function that helps in creating these columns. But in Schema\Table
in Laravel 3, I only see a date()
function, which is:
public function date($name)
{
return $this->column(__FUNCTION__, compact('name'));
}
Looks like it just creates a DATE column. However, I also see that there's this magic function:
public function __call($method, $parameters)
{
if (isset(static::$macros[$method]))
{
array_unshift($parameters, $this);
return call_user_func_array(static::$macros[$method], $parameters);
}
throw new \Exception("Method [$method] does not exist.");
}
Is there a way to create a DATETIME column using this function? How do I go about it? Could not find this info in the documentation.