Open sidebar
<?php class Category extends Validate { protected $table = 'categories'; public $timestamps = true; public function forum() { return $this->belongsTo('Forum'); } public function topic() { return $this->hasMany('Topic'); } } <?php class Topic extends Validate { protected $table = 'topics'; public $timestamps = true; public function user() { return $this->belongsTo('User'); } public function category() { return $this->belongsTo('Category'); } public function post() { return $this->hasMany('Post'); } } <?php class Post extends Validate { protected $table = 'posts'; public $timestamps = true; public function user() { return $this->belongsTo('User'); } public function topic() { return $this->belongsTo('Topic'); } }
Close sidebar
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting