Php do roteador

<?php 

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