TravelImageClass.php 424 B

123456789101112131415161718
  1. <?php
  2. namespace App\Models\TravelImage;
  3. use Illuminate\Database\Eloquent\Model;
  4. class TravelImageClass extends Model{
  5. // protected $connection = 'mysql_szy';
  6. protected $table='travel_img_class';
  7. public function get_image(){
  8. return $this->hasMany(TravelImage::class,'class_id');
  9. }
  10. public function get_folder(){
  11. return $this->hasMany(TravelImageFolder::class,'image_class_id');
  12. }
  13. }