<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Scan extends Model{ protected $connection = 'mysql_w'; protected $table='scan'; public function user() { return $this->belongsTo(UserW::class,'user_id'); } }