-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
582 lines (559 loc) · 28.2 KB
/
index.html
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ChatGPT Power Prompts for PHP and Laravel Developer</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<link rel="apple-touch-icon" sizes="57x57" href="apple-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="60x60" href="apple-icon-60x60.png" />
<link rel="apple-touch-icon" sizes="72x72" href="apple-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="76x76" href="apple-icon-76x76.png" />
<link
rel="apple-touch-icon"
sizes="114x114"
href="apple-icon-114x114.png"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="apple-icon-120x120.png"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="apple-icon-144x144.png"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="apple-icon-152x152.png"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="apple-icon-180x180.png"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="android-icon-192x192.png"
/>
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png" />
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png" />
<link rel="manifest" href="manifest.json" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png" />
<meta name="theme-color" content="#ffffff" />
<script src="https://unpkg.com/alpinejs" defer></script>
<link href="dist/main.css" rel="stylesheet" />
</head>
<body>
<div
class="container mx-auto text-sm sm:px-6 lg:px-8"
x-data="searchComponent()"
x-init="init"
>
<div
class="md:mt-4 overflow-hidden bg-gray-100 rounded ring-1 ring-slate-900/10"
>
<div class="px-4 py-5 sm:p-6">
<div class="flex justify-between gap-x-4">
<div class="flex items-start gap-x-2">
<a href=""
><h1
class="mb-3 text-lg font-extrabold tracking-tight text-blue-700"
>
ChatGPT Power Prompts for PHP and Laravel Developer
</h1></a
>
<span
class="px-2 py-1 text-xs font-semibold text-gray-600 rounded-md ring-1 ring-inset bg-gray-50 ring-slate-600/20"
>Total
<span class="text-blue-600" x-text="items.length"></span>
Prompts</span
>
</div>
</div>
<div class="w-full">
<div class="flex mt-2 rounded shadow-sm">
<div
class="relative flex items-stretch flex-grow focus-within:z-10"
>
<div
class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-5 h-5 text-gray-400"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"
/>
</svg>
</div>
<input
x-model="search"
x-ref="searchInput"
@input="filter"
type="text"
placeholder="Search ChatGPT Power Prompts..."
class="block w-full rounded-none rounded-l border-0 py-1.5 pl-10 text-gray-900 ring-1 ring-inset ring-slate-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-blue-400 sm:text-sm sm:leading-6"
autofocus
/>
</div>
<button
type="button"
@click="clearSearch"
class="relative -ml-px inline-flex items-center gap-x-1.5 rounded-r px-3 py-2 text-sm font-semibold text-gray-400 ring-1 ring-inset ring-slate-300 hover:bg-gray-50"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-5 h-5 text-gray-400"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M12 9.75L14.25 12m0 0l2.25 2.25M14.25 12l2.25-2.25M14.25 12L12 14.25m-2.58 4.92l-6.375-6.375a1.125 1.125 0 010-1.59L9.42 4.83c.211-.211.498-.33.796-.33H19.5a2.25 2.25 0 012.25 2.25v10.5a2.25 2.25 0 01-2.25 2.25h-9.284c-.298 0-.585-.119-.796-.33z"
/>
</svg>
</button>
</div>
<ul class="space-y-2 divide-y divide-slate-300" role="list">
<template x-for="item in displayedItems" :key="item.id">
<li class="py-3">
<div class="flex items-center space-x-4">
<div class="flex-1 min-w-0">
<p
class="mb-2 text-sm font-bold text-gray-900"
x-text="item.title"
></p>
<p class="text-sm text-gray-800" x-text="item.prompt"></p>
</div>
<div>
<button
@click="copyToClipboard(item.prompt, item.id)"
:class="{'bg-green-600': copyStatus[item.id] === 'success', 'bg-red-600': copyStatus[item.id] === 'failed', 'bg-blue-600': copyStatus[item.id] === 'default' || !copyStatus[item.id]}"
class="inline-flex items-center rounded-full px-2.5 py-1 text-xs font-semibold text-white shadow-sm ring-1 ring-inset"
x-text="copyStatus[item.id] === 'success' ? 'Prompt Copied' : 'Copy Prompt'"
></button>
</div>
</div>
</li>
</template>
</ul>
<nav class="flex items-center justify-center mt-4">
<button
@click="setPage(currentPage - 1)"
:disabled="currentPage === 1"
class="px-4 py-2 text-white bg-blue-500 rounded disabled:opacity-50 disabled:cursor-not-allowed"
>
Previous
</button>
<span class="mx-4"
>Page <span x-text="currentPage"></span> of
<span x-text="totalPages()"></span
></span>
<button
@click="setPage(currentPage + 1)"
:disabled="currentPage === totalPages()"
class="px-4 py-2 text-white bg-blue-500 rounded disabled:opacity-50 disabled:cursor-not-allowed"
>
Next
</button>
</nav>
</div>
</div>
</div>
</div>
<script>
function searchComponent() {
return {
items: [
{
id: 1,
title: "Format Laravel Code",
prompt:
"In the context of being a Laravel expert, please format and optimize the following code snippet according to Laravel best practices and coding standards. Do not include explanations in your response, just the properly formatted code. The code snippet is:",
},
{
id: 2,
title: "Create Laravel Model Relationships",
prompt:
"In the context of being a PHP and Laravel developer, create the appropriate Laravel Eloquent relationships for the following scenario: A blog has multiple authors, and each author can write multiple posts. Do not include explanations in your response, just the properly written relationship methods within the respective models.",
},
{
id: 3,
title: "Create Laravel Helper Functions",
prompt:
"In the context of being a PHP and Laravel developer, write a helper function for the following functionality: Create a function to format a given phone number into a standardized format (e.g., +1-555-123-4567). Do not include explanations in your response, just the code for the helper function.",
},
{
id: 4,
title: "Compose Git Commit Messages",
prompt:
"As a proficient English language expert, You will assist me in crafting a Git commit summary (within 72 characters) and a description (up to 100 words) while ensuring proper grammar, fluency, clarity, and conciseness while maintaining a natural human tone. Please be aware that you will only offer in-depth explanations if I specifically ask for them, and you won't include any additional information unless requested.",
},
{
id: 5,
title: "Handle JSON Encoding and Decoding",
prompt:
"In the context of being a PHP and Laravel developer, provide a solution for the following scenario: I have an associative array in PHP that I want to convert to a JSON object and send it as a response from my Laravel controller. Do not include explanations in your response, just the code snippet.",
},
{
id: 6,
title: "Implement Laravel Queues",
prompt:
"In the context of being a PHP and Laravel developer, explain how to set up a basic queue worker with Laravel and the process to dispatch a job to the queue. Do not provide explanations in your response unless specifically requested.",
},
{
id: 7,
title: "Work with Laravel Nova",
prompt:
"In the context of being a PHP and Laravel developer, create a new Laravel Nova resource for a User model with basic CRUD functionality. Do not include explanations in your response, just the necessary code or instructions.",
},
{
id: 8,
title: "Set up Laravel Nova Project",
prompt:
"In the context of being a PHP and Laravel developer with expertise in Laravel Nova, create a new Laravel project with Laravel Nova installed and set up resources. Do not provide explanations in your response unless specifically requested.",
},
{
id: 9,
title: "Implement Full-Text Search with Laravel Scout and MySQL",
prompt:
"In the context of being a PHP and Laravel developer, set up Laravel Scout in a fresh Laravel project and configure it to use the latest MySQL version for full-text search. Do not provide explanations in your response, just the required code and brief instructions.",
},
{
id: 10,
title:
"Implement Full-Text Search with Meilisearch, Laravel, and MySQL",
prompt:
"In the context of being a PHP and Laravel developer, set up Meilisearch and integrate it into a Laravel project. Do not provide explanations in your response, just the required code and brief instructions.",
},
{
id: 11,
title: "Update Laravel Code with Cache",
prompt:
"In the context of being a PHP and Laravel developer, update the following code snippet to use the latest Laravel version while implementing caching mechanisms. Do not include explanations in your response, just the updated and optimized code. The code snippet is:",
},
{
id: 12,
title: "Collect Data from External API",
prompt:
"In the context of being a PHP and Laravel developer, write a Laravel code snippet to make an API request, process the data, and return the desired results in an appropriate format for the following endpoint: 'https://api.example.com/data' and parameter 'user_id=123'. Do not include explanations in your response, just the code snippet.",
},
{
id: 13,
title: "Perform Web Scraping",
prompt:
"In the context of being a PHP and Laravel developer specialized in web scraping, guide me through the process of scraping data from the following website URL using PHP and Laravel tools, libraries, or techniques: 'https://example.com/listings'. Do not provide explanations in your response, just the code snippet.",
},
{
id: 14,
title: "PHP and Laravel Guidance",
prompt:
"In the context of being a PHP and Laravel developer, answer the following question: How can I implement a simple authentication system using Laravel? Focus on addressing the specific question or problem and do not provide general explanations in your response.",
},
{
id: 15,
title: "Analyze and Troubleshoot Laravel Code",
prompt:
"In the context of being a Laravel expert, identify any issues, logical errors, or areas for improvement in the following code snippet. Suggest solutions or replacements for any errors you find. Do not include explanations in your response, just the corrected code or suggestions. The code snippet is:",
},
{
id: 16,
title: "Optimize and Convert PHP Code to Laravel",
prompt:
"In the context of being a code optimization and Laravel conversion assistant, optimize and convert the following PHP code snippet to Laravel syntax, if applicable. Do not provide explanations, just the optimized and updated code. The code snippet is:",
},
{
id: 17,
title: "Optimize Laravel Code Using php-cs-fixer",
prompt:
"In the context of being a Laravel code optimization and formatting expert using php-cs-fixer, optimize and format the following Laravel code snippet. Do not provide explanations, just the optimized and formatted code. The code snippet is:",
},
{
id: 18,
title: "Working with Laravel Middleware",
prompt:
"In the context of being a PHP and Laravel developer with expertise in middleware, answer the following question: 'How do you create and register a custom middleware in Laravel?'",
},
{
id: 19,
title: "Laravel with Livewire, Tailwind CSS, and Alpine.js",
prompt:
"In the context of being an expert in Laravel with Livewire, Tailwind CSS, and Alpine.js, answer the following question: 'How do I set up a new Laravel project with Livewire, Tailwind CSS, and Alpine.js integrated from the beginning?'",
},
{
id: 20,
title: "Working with Laravel HTTP Client",
prompt:
"In the context of being a PHP and Laravel developer specializing in HTTP Client, implement an HTTP Client in Laravel to make a GET request to a third-party API.",
},
{
id: 21,
title: "Laravel Eloquent Query Builder",
prompt:
"In the context of being a Laravel Eloquent query builder assistant, write an Eloquent query builder statement for the following scenario: Retrieve all projects with a 'completed' status, ordered by their 'created_at' timestamp in descending order.",
},
{
id: 22,
title: "MySQL Database Administration",
prompt:
"In the context of being a MySQL database administrator, provide general recommendations for optimizing query performance in a database with 500,000 rows.",
},
{
id: 23,
title: "Laravel Development with MySQL",
prompt:
"In the context of being a Laravel development expert using the latest version of Laravel and MySQL, create a new Laravel project and set up a connection to a MySQL database using the latest versions of both technologies.",
},
{
id: 24,
title: "PHP Development with Laravel Framework",
prompt:
"In the context of being a PHP developer experienced in the Laravel framework, create a new Laravel project called my_blog using Composer.",
},
{
id: 25,
title: "Laravel Coding Tasks and Problem Solving",
prompt:
"In the context of being a Laravel developer, answer the following question: 'How do I set up a one-to-many relationship between two models in Laravel?'",
},
{
id: 26,
title: "Laravel Model Local and Global Scopes",
prompt:
"In the context of being a PHP and Laravel developer, create a local scope in the User model to filter users who have a verified email.",
},
{
id: 27,
title:
"Create Eloquent Accessors, Mutators, and Attribute Casting",
prompt:
"In the context of being a PHP and Laravel developer, write Eloquent Accessors, Mutators, and Attribute Casting for a 'Product' model with attributes: 'name', 'price', 'discount_percentage', and 'final_price'. Do not include explanations, just provide the required code.",
},
{
id: 28,
title: "Implement MVC Pattern in Laravel",
prompt:
"In the context of being a PHP and Laravel developer, provide code snippets for Model, View, and Controller components for a simple user registration system with email and password following the MVC pattern. Do not include explanations, just provide the required code.",
},
{
id: 29,
title:
"Setup Laravel Project with Livewire, Alpine.js, and Tailwind CSS",
prompt:
"In the context of being a PHP and Laravel developer, create a new Laravel project and set up Livewire, Alpine.js, and Tailwind CSS. Do not include explanations, just provide the required steps and code.",
},
{
id: 30,
title: "Improve PHP Code in Laravel",
prompt:
"In the context of being a PHP and Laravel developer, enhance the provided PHP code within the Laravel framework by updating syntax, formatting, and variable names. Do not add or remove functionality; focus on readability, maintainability, and quality. (insert PHP code snippet here)",
},
{
id: 31,
title: "Create Notifications in Laravel",
prompt:
"In the context of being a PHP and Laravel developer, provide code snippets, solutions, or explanations for creating a real-time notification system for a user dashboard. Focus on PHP, Laravel, and relevant web technologies.",
},
{
id: 32,
title: "Implement Task Scheduling in Laravel",
prompt:
"In the context of being a PHP and Laravel developer, explain how to set up a task scheduler in Laravel for a daily email report. Focus on implementation and best practices for task scheduling in Laravel.",
},
{
id: 33,
title: "Manage Processes in Laravel",
prompt:
"In the context of being a PHP and Laravel developer, provide guidance on implementing a new process in Laravel using the command-line interface. Answers should be concise and relevant.",
},
{
id: 34,
title: "Handle File Storage in Laravel",
prompt:
"In the context of being a PHP and Laravel developer, explain how to upload and store a file using Laravel's File Storage system. Focus on file storage and management using PHP and Laravel.",
},
{
id: 35,
title: "Implement Authentication in Laravel",
prompt:
"In the context of being a PHP and Laravel developer, provide solutions, code snippets, or explanations related to setting up authentication using Laravel's built-in features. Focus on PHP and Laravel authentication.",
},
{
id: 36,
title: "Review and Optimize PHP Code",
prompt:
"In the context of being a PHP and Laravel developer, analyze the provided PHP code snippet for the Laravel framework, suggest improvements or corrections, and focus on performance enhancements, better coding practices, and fixing logic errors. (insert PHP code snippet here)",
},
{
id: 37,
title: "Refactor and Optimize PHP Codebase",
prompt:
"In the context of being a Full Stack PHP and Laravel developer, please help me refactor, optimize, and upgrade the following PHP codebase to the latest PHP version: (insert PHP code snippet here)",
},
{
id: 38,
title: "Assistance with Laravel Excel",
prompt:
"In the context of being a Full Stack PHP and Laravel developer experienced in Laravel Excel (https://docs.laravel-excel.com/), please assist me with any questions or issues related to PHP, Laravel, and Laravel Excel. Here is my code and specific question: (My instruction)",
},
{
id: 39,
title: "Linux Administration and Shell Scripting",
prompt:
"In the context of being a Linux Administrator and Shell Script Expert, please provide the required code and brief instructions for the following question:",
},
{
id: 40,
title: "English Language Expertise",
prompt:
"In the context of being a high-level English language expert, please help me improve the following message while maintaining a human tone: (My message)",
},
{
id: 41,
title: "Consistent PHP and Laravel Code",
prompt:
"In the context of being a Full Stack PHP and Laravel developer, please provide the required code and brief instructions for the following question, ensuring consistency with previous responses:",
},
{
id: 42,
title: "Focused and Relevant Responses",
prompt:
"Please ensure that your replies stay focused on the topic at hand and do not introduce unrelated content. With this in mind, let's continue our discussion. Here is my question:",
},
{
id: 43,
title: "Technical Documentation Writing",
prompt:
"In the context of being a Full Stack PHP and Laravel developer, a professional technical documentation writer, and a high-level English language expert, please help me improve the following technical documentation:",
},
{
id: 44,
title: "English Language Expertise (Paraphrase)",
prompt:
"In the context of being a high-level English language expert, please help me improve the following message while maintaining Paraphrase, Fix Grammar, Rewrite, Fluent, Clear, Concise, Human Tone: (My message)",
},
{
id: 45,
title: "Implement Laravel Echo System with Nova, Tailwind, Vue.js, and Inertia.js",
prompt:
"As a highly skilled PHP and Laravel developer with a deep understanding of the Laravel Echo System, including all packages developed by Laravel, as well as Laravel Nova, Tailwind CSS, Vue.js, and Inertia.js, You will be here to provide me with the necessary code or guidance. Please remember that You will only dive into detailed explanations if I ask for them. Laravel Documentation URL: 'https://laravel.com/docs/10.x', Laravel Nova Documentation URL: 'https://nova.laravel.com/docs/4.0/installation.html'. I want to implement the following functionality:",
}
],
search: "",
filteredItems: [],
copyStatus: {},
filter() {
if (!this.search) {
this.filteredItems = this.items;
} else {
this.filteredItems = this.items.filter((item) => {
return (
item.title
.toLowerCase()
.includes(this.search.toLowerCase()) ||
item.prompt.toLowerCase().includes(this.search.toLowerCase())
);
});
}
},
currentPage: 1,
itemsPerPage: 5,
displayedItems() {
const filteredItems = this.search
? this.items.filter((item) => {
return (
item.title
.toLowerCase()
.includes(this.search.toLowerCase()) ||
item.prompt
.toLowerCase()
.includes(this.search.toLowerCase())
);
})
: this.items;
const startIndex = (this.currentPage - 1) * this.itemsPerPage;
const endIndex = startIndex + this.itemsPerPage;
return filteredItems.slice(startIndex, endIndex);
},
totalPages() {
const filteredItems = this.search
? this.items.filter((item) => {
return (
item.title
.toLowerCase()
.includes(this.search.toLowerCase()) ||
item.prompt
.toLowerCase()
.includes(this.search.toLowerCase())
);
})
: this.items;
return Math.ceil(filteredItems.length / this.itemsPerPage);
},
setPage(page) {
if (page < 1 || page > this.totalPages()) return;
this.currentPage = page;
},
paginatedItems() {
const startIndex = (this.currentPage - 1) * this.itemsPerPage;
const endIndex = startIndex + this.itemsPerPage;
return this.filteredItems.slice(startIndex, endIndex);
},
totalPages() {
return Math.ceil(this.filteredItems.length / this.itemsPerPage);
},
setPage(page) {
if (page < 1 || page > this.totalPages()) return;
this.currentPage = page;
},
init() {
this.filter();
},
clearSearch() {
this.$refs.searchInput.value = "";
this.search = "";
this.filter();
},
async copyToClipboard(text, id) {
try {
await navigator.clipboard.writeText(text);
this.copyStatus = { ...this.copyStatus, [id]: "success" };
setTimeout(() => {
this.copyStatus = { ...this.copyStatus, [id]: "default" };
}, 500);
} catch (err) {
console.error("Failed to copy text: ", err);
this.copyStatus = { ...this.copyStatus, [id]: "failed" };
setTimeout(() => {
this.copyStatus = { ...this.copyStatus, [id]: "default" };
}, 500);
}
},
};
}
</script>
</body>
</html>