-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToolController.php
More file actions
137 lines (122 loc) · 3.6 KB
/
ToolController.php
File metadata and controls
137 lines (122 loc) · 3.6 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
<?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' => '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 cron(): View
{
return view('tools.cron-parser');
}
}