belongsTo(Address::class, 'address_id', 'address_id'); } public function rooms() { return $this->hasMany(Room::class, 'cinema_id', 'cinema_id'); } public function showings() { return $this->hasManyThrough(Showing::class, Room::class, 'cinema_id', 'room_id', 'cinema_id', 'room_id'); } public function find($id) { return $this->where('cinema_id', $id)->first(); } public function users() { //users associated return $this->belongsToMany('App\Models\User', 'user_assignments', 'cinema_id', 'user_id'); } }