1234567891011121314151617181920212223242526 |
- <?php
-
- namespace App\Model\Raharja;
-
- use Illuminate\Database\Eloquent\Model;
-
- class News extends Model
- {
-
-
- protected $table = 'news';
- protected $fillable = [
- 'title',
- 'content',
- 'user_id',
- 'thumbnail',
- 'date_publish',
- 'sub_title',
- ];
-
- public function newsLikes(){
- return $this->hasMany(NewsLikes::class, 'news_id', 'id');
- }
-
-
- }
|