Skip to content

Commit 2303906

Browse files
committed
Serve static HTML from the root route handler
1 parent c3abe96 commit 2303906

File tree

1 file changed

+111
-1
lines changed

1 file changed

+111
-1
lines changed

app/Http/Controllers/WelcomeController.php

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,116 @@
77
class WelcomeController extends Controller
88
{
99
public function welcome() {
10-
return '🎊 Welcome to ' . '<a href="https://diploi.com">diploi.com</a>';
10+
return '
11+
<!DOCTYPE html>
12+
<html>
13+
<head>
14+
<title>Laravel (PHP)</title>
15+
<meta name="viewport" content="width=device-width, initial-scale=1" />
16+
<style>
17+
* {
18+
font-family: sans-serif;
19+
font-size: 16px;
20+
}
21+
22+
html,
23+
body {
24+
margin: 0;
25+
min-height: 100vh;
26+
background: #202328;
27+
color: #fff;
28+
}
29+
30+
body {
31+
display: flex;
32+
flex-direction: column;
33+
gap: 8px;
34+
padding: 32px;
35+
align-items: center;
36+
justify-content: center;
37+
box-sizing: border-box;
38+
}
39+
40+
h1 {
41+
font-size: 24px;
42+
}
43+
44+
p,
45+
form,
46+
hr {
47+
max-width: min(400px, 100%);
48+
}
49+
50+
p {
51+
text-align: center;
52+
opacity: 0.8;
53+
line-height: 1.5;
54+
}
55+
56+
button,
57+
.button {
58+
padding: 10px 18px;
59+
align-self: center;
60+
text-decoration: none;
61+
background: #6650fa;
62+
border-radius: 64px;
63+
border: none;
64+
color: #fff;
65+
cursor: pointer;
66+
}
67+
68+
a {
69+
font-size: inherit;
70+
color: inherit;
71+
}
72+
73+
hr {
74+
display: block;
75+
margin: 32px 0;
76+
width: 100%;
77+
height: 2px;
78+
background: #31363f;
79+
border: none;
80+
}
81+
82+
a:last-child {
83+
margin-top: 32px;
84+
}
85+
86+
code {
87+
font-family: monospace;
88+
font-size: 14px;
89+
background: #31363f;
90+
padding: 2px 4px;
91+
border-radius: 4px;
92+
}
93+
</style>
94+
</head>
95+
<body>
96+
<img
97+
alt="Laravel logo"
98+
src="https://github.com/diploi/component-laravel/raw/main/.diploi/icon.svg"
99+
width="64"
100+
height="64"
101+
/>
102+
103+
<h1>Laravel (PHP)</h1>
104+
105+
<p>
106+
Your Laravel (PHP) application is up and running! You can start editing the code in
107+
to build your backend API.
108+
In development stage, Laravel (PHP) will automatically reload as you make changes.
109+
<br><br>
110+
<b> Install dependencies: </b><br>
111+
Please use <code>composer require package_name</code> to add packages to your environment.
112+
</p>
113+
114+
<hr />
115+
116+
<a href="https://diploi.com/"
117+
><img width="54" height="16" src="https://diploi.com/logo-white.svg"
118+
/></a>
119+
</body>
120+
</html>';
11121
}
12122
}

0 commit comments

Comments
 (0)