<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Mountain extends Model
{

    public function routes()
    {
        return $this->belongsToMany(Route::class, 'route_mountain')->where('public', true);
    }
    public function photos()
    {
        return $this->hasMany(Photo::class, 'mountain_id');
    }
}
