-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToolController.php
More file actions
236 lines (212 loc) · 6.52 KB
/
ToolController.php
File metadata and controls
236 lines (212 loc) · 6.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<?php
namespace App\Http\Controllers;
use Illuminate\View\View;
class ToolController extends Controller
{
public function index(): View
{
$tools = [
[
'name' => 'CSV Converter',
'description' => 'Convert CSV to JSON, SQL INSERT statements, or PHP arrays',
'route' => 'tools.csv',
'icon' => 'table',
],
[
'name' => 'YAML/JSON Converter',
'description' => 'Convert between YAML and JSON formats bidirectionally',
'route' => 'tools.yaml',
'icon' => 'code',
],
[
'name' => 'JSON Parser',
'description' => 'Format, minify, validate, and repair JSON data',
'route' => 'tools.json',
'icon' => 'json',
],
[
'name' => 'Markdown Preview',
'description' => 'Preview Markdown as HTML with export option',
'route' => 'tools.markdown',
'icon' => 'document',
],
[
'name' => 'SQL Formatter',
'description' => 'Format, beautify, or compress SQL queries',
'route' => 'tools.sql',
'icon' => 'database',
],
[
'name' => 'Base64 Encoder',
'description' => 'Encode/decode text and files to/from Base64',
'route' => 'tools.base64',
'icon' => 'lock',
],
[
'name' => 'UUID Generator',
'description' => 'Generate, validate, and format UUIDs (v4)',
'route' => 'tools.uuid',
'icon' => 'fingerprint',
],
[
'name' => 'Hash Generator',
'description' => 'Generate MD5, SHA-1, SHA-256, SHA-512 hashes',
'route' => 'tools.hash',
'icon' => 'hash',
],
[
'name' => 'URL Encoder',
'description' => 'Encode/decode URLs and parse URL components',
'route' => 'tools.url',
'icon' => 'link',
],
[
'name' => 'Code Editor',
'description' => 'Write HTML, CSS, JS with live preview',
'route' => 'tools.code-editor',
'icon' => 'editor',
],
[
'name' => 'Regex Tester',
'description' => 'Test and debug regular expressions with live matching',
'route' => 'tools.regex',
'icon' => 'regex',
],
[
'name' => 'Base Converter',
'description' => 'Convert between binary, octal, decimal, and hex',
'route' => 'tools.base-converter',
'icon' => 'calculator',
],
[
'name' => 'Slug Generator',
'description' => 'Convert text to URL-friendly slugs',
'route' => 'tools.slug-generator',
'icon' => 'slug',
],
[
'name' => 'Color Picker',
'description' => 'Pick colors and convert between HEX, RGB, HSL, CMYK',
'route' => 'tools.color-picker',
'icon' => 'color',
],
[
'name' => 'QR Code Generator',
'description' => 'Generate QR codes for URLs, text, and more',
'route' => 'tools.qr-code',
'icon' => 'qrcode',
],
[
'name' => 'HTML Entity Encoder',
'description' => 'Encode/decode HTML entities and special characters',
'route' => 'tools.html-entity',
'icon' => 'html-entity',
],
[
'name' => 'Text Case Converter',
'description' => 'Convert text to camelCase, snake_case, and more',
'route' => 'tools.text-case',
'icon' => 'text-case',
],
[
'name' => 'Password Generator',
'description' => 'Generate secure random passwords',
'route' => 'tools.password',
'icon' => 'key',
],
[
'name' => 'Lorem Ipsum Generator',
'description' => 'Generate placeholder text for designs',
'route' => 'tools.lorem',
'icon' => 'text',
],
[
'name' => 'Cron Parser',
'description' => 'Parse and explain cron expressions',
'route' => 'tools.cron',
'icon' => 'clock',
],
];
return view('home', compact('tools'));
}
public function csv(): View
{
return view('tools.csv');
}
public function yaml(): View
{
return view('tools.yaml');
}
public function json(): View
{
return view('tools.json');
}
public function markdown(): View
{
return view('tools.markdown');
}
public function sql(): View
{
return view('tools.sql');
}
public function base64(): View
{
return view('tools.base64');
}
public function uuid(): View
{
return view('tools.uuid');
}
public function hash(): View
{
return view('tools.hash');
}
public function url(): View
{
return view('tools.url');
}
public function codeEditor(): View
{
return view('tools.code-editor');
}
public function regex(): View
{
return view('tools.regex');
}
public function baseConverter(): View
{
return view('tools.base-converter');
}
public function slugGenerator(): View
{
return view('tools.slug-generator');
}
public function colorPicker(): View
{
return view('tools.color-picker');
}
public function qrCode(): View
{
return view('tools.qr-code');
}
public function htmlEntity(): View
{
return view('tools.html-entity');
}
public function textCase(): View
{
return view('tools.text-case');
}
public function password(): View
{
return view('tools.password-generator');
}
public function lorem(): View
{
return view('tools.lorem-ipsum');
}
public function cron(): View
{
return view('tools.cron-parser');
}
}