Helpers
[[toc]]
Available Methods
Paths
Time
Paths
path.App()
path.App()
The path.App()
function returns the path to your application's app directory. You may also use the path.App()
function to generate a path to a file relative to the application directory:
path.Base()
path.Base()
The path.Base()
function returns the path to your application's root directory. You may also use the path.Base()
function to generate a path to a given file relative to the project root directory:
path.Config()
path.Config()
The path.Config()
function returns the path to your application's config directory. You may also use the path.Config()
function to generate a path to a given file within the application's configuration directory:
path.Database()
path.Database()
The path.Database()
function returns the path to your application's database directory. You may also use the path.Database()
function to generate a path to a given file within the database directory:
path.Storage()
path.Storage()
The path.Storage()
function returns the path to your application's storage directory. You may also use the path.Storage()
function to generate a path to a given file within the storage directory:
path.Public()
path.Public()
The path.Public()
function returns the path to your application's public directory. You may also use the path.Public()
function to generate a path to a given file within the public directory:
Time
carbon.Now()
carbon.Now()
Get current time:
carbon.SetTimezone()
carbon.SetTimezone()
Set timezone:
carbon.Parse()
carbon.Parse()
Get Carbon
object by String:
carbon.FromTimestamp()
carbon.FromTimestamp()
Get Carbon
Object by timestamp:
carbon.FromDateTime()
carbon.FromDateTime()
Get Carbon
Object by date time:
carbon.FromDate()
carbon.FromDate()
Get Carbon
Object by date:
carbon.FromTime()
carbon.FromTime()
Get Carbon
Object by time:
carbon.FromStdTime()
carbon.FromStdTime()
Get Carbon
Object by time.Time
:
carbon.IsTestNow()
carbon.IsTestNow()
Determine whether the time is a test value:
carbon.SetTestNow()
carbon.SetTestNow()
Set the time to a test value:
carbon.UnsetTestNow()
carbon.UnsetTestNow()
Restore the time to a normal value:
Last updated