Blog.php 281 B

12345678910111213141516
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class Blog extends Model
  6. {
  7. use SoftDeletes;
  8. public function category() {
  9. return $this->belongsTo(BlogCategory::class, 'category_id');
  10. }
  11. }