initial commit of laravel!
This commit is contained in:
24
system/db/eloquent/meta.php
Normal file
24
system/db/eloquent/meta.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php namespace System\DB\Eloquent;
|
||||
|
||||
class Meta {
|
||||
|
||||
/**
|
||||
* Get the table name for a model.
|
||||
*
|
||||
* @param string $class
|
||||
* @return string
|
||||
*/
|
||||
public static function table($class)
|
||||
{
|
||||
// -----------------------------------------------------
|
||||
// Check for a table name override.
|
||||
// -----------------------------------------------------
|
||||
if (property_exists($class, 'table'))
|
||||
{
|
||||
return $class::$table;
|
||||
}
|
||||
|
||||
return \System\Str::lower(\System\Inflector::plural($class));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user