PHP code example of martinbean / eloquent-singular-table-names
1. Go to this page and download the library: Download martinbean/eloquent-singular-table-names library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
martinbean / eloquent-singular-table-names example snippets
namespace App;
use Illuminate\Database\Eloquent\Model;
use MartinBean\Database\Eloquent\SingularTableName;
class User extends Model
{
use SingularTableName;
}
namespace App;
use Illuminate\Database\Eloquent\Model;
use MartinBean\Database\Eloquent\SingularTableName;
abstract class SingularModel extends Model
{
use SingularTableName;
}
namespace App;
class User extends SingularModel
{
// No need to implement trait
}