Skip to content
Snippets Groups Projects
Commit 273f0218 authored by Nicolas Borboën's avatar Nicolas Borboën
Browse files

[feature] basic view for homepage

and some debug routes
parent db5e8ae6
No related branches found
No related tags found
No related merge requests found
canapGEST/API/public/FA.png

58.7 KiB

<svg id="logo_epfl_2019" data-name="logo epfl 2019" xmlns="http://www.w3.org/2000/svg" width="182.4" height="53" viewBox="0 0 182.4 53"><defs><style>.cls-1{fill:red;}</style></defs><title>epfl-logo-new</title><polygon class="cls-1" points="0 21.6 11.43 21.6 11.43 9.8 38.34 9.8 38.34 0 0 0 0 21.6"/><polygon class="cls-1" points="0 53 38.34 53 38.34 43.2 11.43 43.2 11.43 31.4 0 31.4 0 53"/><rect class="cls-1" x="11.43" y="21.6" width="24.61" height="9.8"/><path class="cls-1" d="M86,4.87a16.12,16.12,0,0,0-5.68-3.53A23.76,23.76,0,0,0,71.82,0H48.14V53H59.57V31.4H71.82a23.76,23.76,0,0,0,8.46-1.34A16.12,16.12,0,0,0,86,26.53a13.43,13.43,0,0,0,3.19-5,17.38,17.38,0,0,0,0-11.62A13.52,13.52,0,0,0,86,4.87ZM78,18.73a5.7,5.7,0,0,1-2.26,1.8,11.33,11.33,0,0,1-3.27.85,32,32,0,0,1-3.86.22H59.57V9.8h9.05a32,32,0,0,1,3.86.22,11,11,0,0,1,3.27.86A5.59,5.59,0,0,1,78,12.67a5,5,0,0,1,.86,3A5,5,0,0,1,78,18.73Z"/><polygon class="cls-1" points="155.47 43.2 155.47 0 144.04 0 144.04 53 182.38 53 182.38 43.2 155.47 43.2"/><polygon class="cls-1" points="97.42 21.6 108.85 21.6 108.85 9.8 135.76 9.8 135.76 0 97.42 0 97.42 21.6"/><rect class="cls-1" x="97.42" y="31.4" width="11.43" height="21.6"/><rect class="cls-1" x="108.85" y="21.6" width="24.61" height="9.8"/></svg>
<?php
if ($_GET['phpinfo']) {
phpinfo();
} else {
echo "Nothing here";
}
<!-- View stored in resources/views/welcome.php -->
<html>
<head>
<title>CANAP API</title>
<style>
header img {
vertical-align: middle;
}
header .logo-epfl img {
height: 30px
}
header .logo-fa img {
height: 50px
}
</style>
</head>
<body>
<header>
<a class="logo logo-epfl">
<img src="/epfl-logo.svg" alt="Logo EPFL, École polytechnique fédérale de Lausanne" class="img-fluid">
</a>
<a class="logo logo-fa">
<img src="/FA.png" alt="Logo FA, Formation Apprentis EPFL" class="img-fluid">
</a>
</header>
<h1>CANAP API</h1>
</body>
</html>
<?php
// Add a basic home page to the API, without auth
$router->get('/', function() {
return view('welcome');
});
// Comfort route to test DB and PDO
// https://github.com/laravel/framework/issues/30737
$router->get('/test-db', function() {
try {
DB::connection()->getPdo();
} catch (\Exception $e) {
die("<pre>Could not connect to the database. Please check your configuration. error:" . $e );
}
});
// Comfort route to test the status list
$router->get('/test-status', 'StatusController@getAvailableStatus');
$router->get('api/auth/login', 'AuthController@login');
$router->get('api/auth/tequilareturn', 'AuthController@tequilareturn');
// logout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment