mardi 2 août 2016

how does laravel finds the connection between models and its table in database

in my model i have

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Page extends Model
{
    //
}

in my controller i can say Page:all() and get all the rows from pages table but i dont see any connection between Page model and pages table in the database

does it just guess table name based on the model name (lower case with extra s at the end ) or it's mentioned somewhere else ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire