Server IP : 127.0.1.1 / Your IP : 216.73.216.172 Web Server : Apache/2.4.52 (Ubuntu) System : Linux bahcrestlinepropertiesllc 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/bahcrestline/core/app/ |
Upload File : |
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Topic extends Model { //Relation to webmasterSections public function webmasterSection() { return $this->belongsTo('App\WebmasterSection', 'webmaster_id'); } //Relation to Sections public function section() { return $this->belongsTo('App\Section', 'section_id'); } //Relation to TopicCategory public function categories() { return $this->hasMany('App\TopicCategory'); } //Relation to Users public function user() { return $this->belongsTo('App\User', 'created_by'); } //Relation to Photos public function photos() { return $this->hasMany('App\Photo', 'topic_id')->orderby('row_no', 'asc'); } //Relation to Attach Files public function attachFiles() { return $this->hasMany('App\AttachFile', 'topic_id')->orderby('row_no', 'asc'); } //Relation to Related Topics public function relatedTopics() { return $this->hasMany('App\RelatedTopic', 'topic_id')->orderby('row_no', 'asc'); } //Relation to Maps public function maps() { return $this->hasMany('App\Map', 'topic_id')->orderby('row_no', 'asc'); } //Relation to Comments public function comments() { return $this->hasMany('App\Comment', 'topic_id')->orderby('row_no', 'asc'); } //Relation to New Comments public function newComments() { return $this->hasMany('App\Comment', 'topic_id')->where('status', '=', 0)->orderby('row_no', 'asc'); } //Relation to approved Comments public function approvedComments() { return $this->hasMany('App\Comment', 'topic_id')->where('status', '=', 1)->orderby('row_no', 'asc'); } //Relation to Additional Fields public function fields() { return $this->hasMany('App\TopicField', 'topic_id')->orderby('id', 'asc'); } }