I'm trying to implement eloquent ORM inside my Slim project. This is, for exemple my Post
model.
class Post extends \Illuminate\Database\Eloquent\Model {
public function author() {
return $this->belongsTo('App\Models\User');
}
public function category() {
return $this->belongsTo('App\Models\Category');
}
public function tags() {
return $this->belongsToMany('App\Models\Tag');
}
}
After many research, I still don't have any ideas of how do I create my table in PhpMyAdmin. Which name for each column should I use ? How to make the many to many or one to many relations ?