enrutador php

<?php 

$route = $_GET['p'];
    $routes=[
        'contact'=>'views/contacts.php',
    ];
    require($routes[$route]);
?>
naly moslih