<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Cyfervoid.com</title>
        <link>https://cyfervoid.com</link>
        <description>asdasd</description>
        <language>en</language>
        <lastBuildDate>Tue, 05 May 2026 04:14:15 GMT</lastBuildDate>
        <atom:link href="https://cyfervoid.com/feed.xml" rel="self" type="application/rss+xml" />
        <item>
            <title>Lightweight Monitoring: Free Webhook + Logs + Email Alerts</title>
            <link>https://cyfervoid.com/free-tools/lightweight-monitoring-free-webhook-logs-email-alerts</link>
            <guid isPermaLink="true">https://cyfervoid.com/free-tools/lightweight-monitoring-free-webhook-logs-email-alerts</guid>
            <description><![CDATA[A free, lightweight webhook for incident alerts. Log everything you send and receive email notifications (up to 5/day), or use your own Brevo limits via a custom API.]]></description>
            <content:encoded><![CDATA[<h3>Introducing a Free Webhook for Simple Downtime and Error Alerts</h3><p>If you run an app, a website, or even a side project, you already know the truth: things break at the worst possible time.</p><p>A server goes down. A deployment misbehaves. A background job silently fails. And the real pain is not that it happened, it’s that you didn’t find out until users did.</p><p>That’s exactly why I built a new, simple webhook tool that anyone can use for free. It’s designed to help you notify yourself when something goes wrong, without needing to set up a full monitoring stack.</p><h2>What it does</h2><p>At its core, the app is a webhook endpoint you can call from anywhere.</p><p>When your system detects a problem, you send a request to the webhook. The app will:</p><ul><li><strong>Log everything you send</strong> so you have a clear record of incidents and payload details</li><li><strong>Send an email notification</strong> so you know immediately something needs attention</li></ul><p>This works great for:</p><ul><li>Uptime checks (site is down, API is unreachable)</li><li>Error handlers (your app catches an exception and reports it)</li><li>Automation failures (a scheduled job didn’t run, a workflow crashed)</li><li>Anything else that deserves a “hey, look at this now” message</li></ul><h2>Built for simplicity</h2><p>You don’t need to install an agent. You don’t need special infrastructure.</p><p>If your app can make an HTTP request, you can use this. That means it fits neatly into server-side applications, CI/CD pipelines, cron jobs, and no-code tools that can call webhooks.</p><h2>Email notifications (free, with a fair limit)</h2><p>To keep it free and reliable for everyone, email sending includes a small cap:</p><ul><li><strong>Up to 5 email notifications per day</strong></li></ul><p>That’s usually enough to cover “something is down” or “something is failing” without turning your inbox into a firehose.</p><h2>Need higher limits? Use your own email provider via Brevo</h2><p>If your use case requires more than 5 emails a day, you can plug in your own email sending through <strong>Brevo</strong> using the custom API option.</p><ul><li>Emails are sent using <strong>your own Brevo account</strong></li><li>Your sending capacity depends on <strong>your Brevo plan and limits</strong></li><li>You keep full control over deliverability and scale</li></ul><p>This keeps the app simple for everyone, while power users can scale without friction.</p><h2>Why I made this</h2><p>Monitoring tools are great, but not everyone needs a complex platform or paid plan just to get basic alerts.</p><p>Sometimes you just want a webhook you can hit, a log of what happened, and an email that tells you to go check. This is built to be that lightweight missing piece.</p><h2>Get started</h2><p>Start sending events in minutes. Use it for uptime pings, error reports, or “this should never happen” alerts. The app will store the payload and notify you so you can take action fast.</p><p><a href="https://sitesentinel.cyfervoid.com/">Try it here!</a> 👈🏽&nbsp;</p>]]></content:encoded>
            <pubDate>Fri, 30 Jan 2026 10:36:31 GMT</pubDate>
        </item>
        <item>
            <title>Take Control of Your Money With a Simple Expense Tracker App</title>
            <link>https://cyfervoid.com/free-tools/take-control-of-your-money-with-a-simple-expense-tracker-app</link>
            <guid isPermaLink="true">https://cyfervoid.com/free-tools/take-control-of-your-money-with-a-simple-expense-tracker-app</guid>
            <description><![CDATA[Track your expenses, set budgets, and see how much you save with a simple and intuitive expense tracker app designed for clarity and control.]]></description>
            <content:encoded><![CDATA[<p id="isPasted">It has been a while since my last blog post. Over the past months, I have been busy with different projects, learning along the way, and exploring new ideas. Today, I am excited to share one of those projects, a simple expense tracker web app.</p><p id="isPasted">This project came from a personal need. I wanted a clean and straightforward way to track my expenses, understand my monthly spending, and see how much I was actually saving. Instead of adding complexity, the focus was on building something practical, fast, and easy to use.</p><h4 id="isPasted">Clear Monthly Overview</h4><p>The webapp provides a straightforward monthly overview that shows total expenses at a glance. This makes it easy to stay aware of your spending habits without manually reviewing every transaction. With one look, users can understand how their month is shaping up financially.</p><h4>Smart Filtering for Better Insights</h4><p>To help users dive deeper into their data, the webapp supports filtering by date range and category. Whether you want to review spending from the last few days or analyze specific categories like food, transport, or entertainment, filtering turns raw data into meaningful insights.</p><p>This flexibility makes it easier to identify trends, spot unnecessary expenses, and adjust habits accordingly.</p><h4>Built-In Budgeting</h4><p>Budgeting is a key part of staying in control of your finances. The webapp allows users to set a budget and track progress in real time. Instead of guessing where your money stands, you can instantly see how much you have spent and how close you are to your limit.</p><h4>See How Much You Save</h4><p>Beyond tracking expenses, the webapp highlights savings in a clear and motivating way. By comparing spending against the set budget, users can immediately see how much money they are saving. This turns financial discipline into something visible and rewarding.</p><h4>Designed to Be Simple</h4><p>The strength of this webapp lies in its simplicity. Every feature has a clear purpose and is easy to use. By keeping the experience focused and distraction-free, users can manage their finances quickly and confidently.</p><h4>Start Tracking Your Expenses Today</h4><p>If you are looking for a practical and easy way to stay on top of your finances, this webapp is ready to use.</p><p>👉 <strong>Try the webapp here:</strong><br><a href="https://paylog.cyfervoid.com">https://paylog.cyfervoid.com</a></p><p>Thanks for reading, and more projects and write-ups are coming soon.</p><h4><br></h4>]]></content:encoded>
            <pubDate>Tue, 27 Jan 2026 00:36:06 GMT</pubDate>
        </item>
        <item>
            <title>Website Down? How I Fixed It by Restarting PHP-FPM in Ubuntu</title>
            <link>https://cyfervoid.com/server/website-down-how-i-fixed-it-by-restarting-php-fpm-in-ubuntu</link>
            <guid isPermaLink="true">https://cyfervoid.com/server/website-down-how-i-fixed-it-by-restarting-php-fpm-in-ubuntu</guid>
            <description><![CDATA[If your PHP-based site suddenly goes down and shows no errors, it could be a PHP-FPM issue. Learn how I diagnosed and fixed it by restarting PHP on Ubuntu—and how to prevent it from happening again.]]></description>
            <content:encoded><![CDATA[<h2>Website Down? Here’s What Happened</h2><p>Recently, my PHP-based application went down—completely unresponsive. No errors, no crashes—just a blank, stalled site. Sound familiar?</p><h2>Diagnosing the Problem</h2><p>I suspected something with PHP-FPM, so I checked its status on my Ubuntu server:</p><pre><code>sudo systemctl status php8.1-fpm</code></pre><p>The result?</p><pre><code>Status: "Processes active: 5, idle: 0, Requests: 13432, slow: 0, Traffic: 0.00req/sec"</code></pre><p>This told me:</p><ul><li><strong>All PHP workers were busy</strong> (<code>Processes active: 5</code>)</li><li><strong>No idle workers available</strong> (<code>Idle: 0</code>)</li><li><strong>Traffic had stopped</strong> despite of 5 active processes</li></ul><p>That explained the freeze: PHP-FPM was overloaded.</p><h2>✅ The Quick Fix: Restart PHP-FPM</h2><p>To bring the site back online instantly, I ran:</p><pre><code>sudo systemctl restart php8.1-fpm</code></pre><p>After that, the server started handling traffic again and the site was back.</p><h2>Why It Happened: PHP-FPM Limits</h2><p>By default, PHP-FPM allows only a limited number of concurrent worker processes. If your site gets too many simultaneous requests, those processes can all get occupied — and when they’re full, new requests just wait (or time out).</p><h2>The Real Fix: Increase Worker Limits</h2><p>To avoid this in the future, I edited PHP-FPM’s config:</p><pre><code>sudo nano /etc/php/8.1/fpm/pool.d/www.conf</code></pre><p>And changed:</p><pre><code>pm = dynamic
pm.max_children = 10         ; was 5
pm.start_servers = 3         ; was 2
pm.min_spare_servers = 2     ; was 1
pm.max_spare_servers = 5     ; was 3</code></pre><p>Then reloaded the service:</p><pre><code>sudo systemctl restart php8.1-fpm</code></pre><p>Now, my server can handle more concurrent users without freezing up.</p><h2>Bonus Tip: Monitor in Real-Time</h2><p>Keep an eye on PHP-FPM activity with:</p><pre><code>sudo journalctl -fu php8.1-fpm</code></pre><p>And monitor Nginx/Apache logs:</p><pre><code>sudo tail -f /var/log/nginx/error.log</code></pre><h2>Conclusion</h2><p>If your PHP site suddenly freezes up, don’t panic. Check your PHP-FPM status — you might just need a quick restart. But for long-term stability, increasing the number of PHP worker processes based on your traffic is the way to go.</p>]]></content:encoded>
            <pubDate>Thu, 03 Jul 2025 08:59:07 GMT</pubDate>
        </item>
        <item>
            <title>Duterte Arrest Warrant: Exposing Media Bias and Death Toll Discrepancies</title>
            <link>https://cyfervoid.com/politics/duterte-arrest-warrant-exposing-media-bias-and-death-toll-discrepancies</link>
            <guid isPermaLink="true">https://cyfervoid.com/politics/duterte-arrest-warrant-exposing-media-bias-and-death-toll-discrepancies</guid>
            <description><![CDATA[A closer look at the ICC’s arrest warrant for Duterte reveals only 43 alleged deaths, contradicting media reports of 6,000 to 30,000. This article examines the discrepancy and its implications.]]></description>
            <content:encoded><![CDATA[<p>Recent discussions surrounding the International Criminal Court’s (ICC) arrest warrant for former Philippine President Rodrigo Duterte have sparked widespread debate. Media reports have long cited figures ranging from <strong>6,000 to 30,000</strong> drug war-related deaths, yet the official ICC document only mentions <strong>43 alleged killings</strong>. This stark discrepancy raises questions about media narratives, political motivations, and the actual scope of the charges. In this article, we analyze the numbers, assess the credibility of different sources, and explore the broader implications of this case.</p><p><strong>The ICC’s Arrest Warrant: What Does It Actually Say?</strong><br>On March 2024, the ICC issued an arrest warrant against Rodrigo Duterte and other officials for alleged crimes against humanity linked to the Philippine government’s war on drugs. Contrary to widely circulated figures of thousands or even tens of thousands of deaths, the official document explicitly mentions <strong>43&nbsp;</strong>cases in its allegations.</p><p>The ICC’s document states that these <strong>43&nbsp;</strong>incidents were selected based on specific evidence gathered from witnesses, forensic reports, and official government data. The document does not claim that these are the only deaths, but it does not substantiate the frequently quoted higher figures.</p><p><strong>The Media’s Death Toll: Where Do the Numbers Come From?</strong><br>Major news outlets and human rights organizations have often cited figures between<strong>&nbsp;6,000 and 30,000</strong> deaths attributed to the Philippine drug war. These numbers come from various sources, including:</p><ul><li><strong>Philippine National Police (PNP) Data:</strong> The PNP has officially reported around <strong>6,252&nbsp;</strong>deaths in anti-drug operations from 2016 to 2022.</li><li><strong>Human Rights Groups:</strong> Organizations such as Amnesty International and Human Rights Watch estimate the death toll to be much higher, often citing community reports and undocumented cases.</li><li><strong>Media Reports:</strong> Some reports rely on statements from opposition groups, activists, and anecdotal evidence rather than official documentation.</li></ul><p>The lack of a single, verifiable database means these estimates remain controversial. The ICC’s reliance on 43 cases suggests that its prosecution team did not find sufficient evidence to support claims of <strong>6,000+&nbsp;</strong>confirmed extrajudicial killings.</p><p><strong>Why the Discrepancy?</strong></p><ol><li><strong>Legal Burden of Proof:</strong> The ICC requires evidence strong enough to hold up in court. While thousands of deaths may have been reported, proving them as state-sanctioned extrajudicial killings requires specific documentation.</li><li><strong>Media Sensationalism:</strong> High numbers generate more attention and fit a specific narrative that Duterte’s war on drugs was a<strong>&nbsp;“mass murder campaign.”&nbsp;</strong>However, without solid verification, these claims remain speculative.</li><li><strong>Political Motivations:</strong> The ICC’s case is inherently political, as it involves international intervention in a sovereign nation’s affairs. Opposing political factions may have incentives to <strong>exaggerate figures.</strong></li></ol><p><strong>The Role of Biased Media</strong></p><ul><li><strong>Selective Reporting:</strong> Many international and local media platforms highlight unverified death tolls while downplaying official statistics that contradict their narrative.</li><li><strong>Reliance on Opposition-Backed Sources:</strong> Reports often cite activist groups and political opponents without cross-checking information with independent sources.</li><li><strong>Ignoring Positive Outcomes:</strong> Media coverage rarely acknowledges the significant reduction in crime rates and drug-related incidents resulting from Duterte’s policies.</li></ul><p>This pattern of reporting suggests an agenda-driven approach rather than objective journalism, reinforcing public misconceptions and creating an international image of the Philippines that aligns with political interests.</p><p><strong>Implications for the Philippines and Duterte</strong></p><ul><li><strong>Legal:</strong> Duterte’s defense team could argue that the limited number of cases in the ICC warrant weakens the genocide or mass killing accusations.</li><li><strong>Political:</strong> The discrepancy may fuel skepticism about international organizations’ fairness and objectivity in prosecuting leaders of developing nations.</li><li><strong>Media Accountability:</strong> The case underscores the need for responsible journalism that verifies claims rather than amplifies unproven figures.</li></ul><p><strong>Conclusion</strong><br>The ICC’s arrest warrant for Duterte highlights a significant gap between media narratives and legal documentation. While the war on drugs remains a contentious issue, the actual charges against Duterte are based on a much smaller number of cases than many were led to believe. This raises critical questions about how information is reported, the political interests involved, and the credibility of both international legal bodies and media outlets.</p><p>As the case progresses, it is essential to separate facts from speculation and ensure that justice—whether for the accused or the victims—is based on truth, not manipulated numbers.</p><p><br></p><p><strong id="isPasted">Disclaimer:</strong><br>This website primarily focuses on computer programming and technology-related content. However, as a concerned Filipino citizen, I cannot ignore the recent events unfolding in our country. While this article deviates from my usual topics, I feel compelled to express my thoughts on the unjust arrest of former President Rodrigo Duterte. This is a personal reflection on the situation, driven by disappointment and a call for fairness.</p>]]></content:encoded>
            <pubDate>Sat, 15 Mar 2025 04:44:28 GMT</pubDate>
        </item>
        <item>
            <title>The Unjust Arrest of Former President Rodrigo Duterte: A Political Power Play?</title>
            <link>https://cyfervoid.com/politics/the-unjust-arrest-of-former-president-rodrigo-duterte-a-political-power-play</link>
            <guid isPermaLink="true">https://cyfervoid.com/politics/the-unjust-arrest-of-former-president-rodrigo-duterte-a-political-power-play</guid>
            <description><![CDATA[The arrest of former Philippine President Rodrigo Duterte raises serious concerns about political motivations and legal overreach. Is this truly justice or just a political maneuver?]]></description>
            <content:encoded><![CDATA[<p>The recent arrest of former Philippine President Rodrigo Duterte has sparked widespread debate, with many questioning its legality and political motivations. Duterte, a leader known for his strong stance on crime, has now become the target of international legal actions. But is this truly about justice, or is it part of a larger political strategy to silence his influence?</p><p><strong>A Questionable Arrest</strong><br>The arrest of former President Rodrigo Duterte under the International Criminal Court (ICC) warrant has ignited controversy not only in the Philippines but around the world. Duterte, who served as the country’s leader from 2016 to 2022, gained popularity for his aggressive anti-drug campaign. While critics claim this campaign led to human rights violations, his supporters argue that it significantly reduced crime and improved public safety.</p><p>Duterte’s arrest raises several legal and ethical questions. The Philippines formally withdrew from the ICC in 2019, meaning that its jurisdiction over the country is highly debatable. If the Philippines is no longer a member of the ICC, then why is this warrant being enforced?</p><p><strong>Political Persecution Disguised as Justice?</strong><br>Many believe that this arrest is less about justice and more about eliminating a strong political figure who remains highly influential. Duterte’s popularity among Filipinos remains strong, and his family continues to hold powerful political positions. His daughter, Sara Duterte, is currently the Vice President, making her a direct rival to the current administration.</p><p>The timing of the arrest raises even more suspicion. With midterm elections approaching, could this be a strategic move to weaken Duterte’s political allies and prevent them from gaining momentum? The arrest of a former leader on international charges, despite the Philippines’ non-membership in the ICC, suggests a coordinated effort to discredit his legacy.</p><p><strong>The Hypocrisy of International Intervention</strong><br>It is also worth questioning why the ICC is so determined to prosecute Duterte when other global leaders accused of war crimes remain free. There are world leaders responsible for mass killings, yet they continue to enjoy diplomatic immunity. Why is the ICC prioritizing Duterte over more pressing international crimes?</p><p>The arrest also disregards the Philippine judicial system, implying that local institutions are incapable of handling their own legal matters. This undermines the country’s sovereignty and raises concerns about foreign influence in domestic affairs.</p><p><strong>The People's Voice</strong><br>Despite the controversy, many Filipinos continue to support Duterte, citing his leadership’s tangible improvements in security and economic stability. Massive protests have erupted nationwide, with supporters calling for his immediate release. Their argument is simple: if Duterte committed crimes, he should be tried by Philippine courts, not an international body with questionable authority over the country.</p><p><strong>Conclusion: A Fight for Justice</strong><br>Duterte’s arrest is a dangerous precedent that could be used against any leader who dares to challenge powerful interests. Whether one agrees with his policies or not, his fate should be determined by the Filipino people and Philippine courts, not an external institution.</p><p>The fight is not just about Duterte—it’s about protecting national sovereignty and ensuring that justice is not manipulated for political gain. If the rule of law is truly the goal, then fair legal proceedings within the Philippines must take precedence over foreign intervention.</p><p><strong>Disclaimer:</strong><br>This website primarily focuses on computer programming and technology-related content. However, as a concerned Filipino citizen, I cannot ignore the recent events unfolding in our country. While this article deviates from my usual topics, I feel compelled to express my thoughts on the unjust arrest of former President Rodrigo Duterte. This is a personal reflection on the situation, driven by disappointment and a call for fairness.</p>]]></content:encoded>
            <pubDate>Tue, 11 Mar 2025 18:19:02 GMT</pubDate>
        </item>
        <item>
            <title>Python for Absolute Beginners: A Step-by-Step Guide</title>
            <link>https://cyfervoid.com/web-development/python-for-absolute-beginners-a-step-by-step-guide</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/python-for-absolute-beginners-a-step-by-step-guide</guid>
            <description><![CDATA[Learn Python from scratch with this beginner-friendly guide. Understand basic concepts, syntax, and write your first Python program with ease.]]></description>
            <content:encoded><![CDATA[<p>Python is one of the most popular programming languages today, known for its simplicity and readability. Whether you want to develop web applications, automate tasks, or dive into data science, Python is a great language to start with. This tutorial will guide you through the basics of Python programming, covering fundamental concepts, syntax, and practical examples.</p><p><br></p><h3>Introduction to Python</h3><p>Python is a high-level, interpreted programming language. It is widely used in various domains such as web development, data analysis, artificial intelligence, and more.</p><p><strong>Why Learn Python?</strong><br>&gt;</p><ul><li>Easy to read and write</li><li>Extensive community support</li><li>Versatile and widely used in various industries</li><li>Open-source and free to use</li></ul><p><strong>Installing Python</strong><br>To get started with Python, you need to install it on your computer. Download the latest version from <a href="https://python.org">python.org</a> and follow the installation instructions.</p><p>To check if Python is installed, open a terminal or command prompt and type:</p><pre>python --version</pre><p><br></p><h3>Writing Your First Python Program</h3><p>Once Python is installed, you can write and run your first program. Open a text editor or the Python interactive shell and type:</p><pre>print("Hello, World!")</pre><p>Save the file as <strong>hello.py</strong> and run it using:</p><pre>python hello.py</pre><p>You should see the output:</p><pre>Hello, World!</pre><p><br></p><h3>Python Basics</h3><p><strong>Variables and Data Types</strong><br>Variables store data in Python. You don’t need to declare the type explicitly:</p><pre>name = "Alice"  # String
age = 25        # Integer
height = 5.6    # Float
is_student = True  # Boolean</pre><p><strong>Basic Input and Output</strong><br>Python allows user input using <strong>input()</strong>:</p><pre>name = input("Enter your name: ")
print("Hello, " + name + "!")</pre><p><strong>Operators</strong><br>Python supports different types of operators:</p><pre>x = 10
y = 5
print(x + y)  # Addition
print(x - y)  # Subtraction
print(x * y)  # Multiplication
print(x / y)  # Division
print(x % y)  # Modulus</pre><p><br></p><h3>Control Flow</h3><p><strong>Conditional Statements</strong><br>Python uses if, elif, and else for decision-making:</p><pre>age = int(input("Enter your age: "))
if age &gt;= 18:
    print("You are an adult.")
elif age &gt;= 13:
    print("You are a teenager.")
else:
    print("You are a child.")</pre><p><strong>Loops</strong><br>For Loop</p><pre>for i in range(5):
    print("Iteration:", i)</pre><p>While Loop</p><pre>count = 0
while count &lt; 5:
    print("Count:", count)
    count += 1</pre><p><br></p><h3>Functions</h3><p>Functions help organize code into reusable blocks:</p><pre>def greet(name):
    print("Hello, " + name + "!")

greet("Alice")
greet("Bob")</pre><p><br></p><h3>Lists and Dictionaries</h3><p><strong>Lists</strong><br>Lists store multiple items in a single variable:</p><pre>fruits = ["apple", "banana", "cherry"]
print(fruits[0])  # Output: apple</pre><p><strong>Dictionaries</strong><br>Dictionaries store key-value pairs:</p><pre>person = {"name": "Alice", "age": 25}
print(person["name"])  # Output: Alice</pre><p><br></p><h3>File Handling</h3><p>Reading a File</p><pre>with open("example.txt", "r") as file:
    content = file.read()
    print(content)</pre><p>Writing to a File</p><pre>with open("example.txt", "w") as file:
    file.write("Hello, Python!")</pre><p><br></p><h3>Error Handling</h3><p>Python uses <strong>try-except</strong> to handle errors:</p><pre>try:
    x = int(input("Enter a number: "))
    print(10 / x)
except ZeroDivisionError:
    print("Cannot divide by zero!")
except ValueError:
    print("Invalid input! Please enter a number.")</pre><p><br></p><h3>Conclusion</h3><p>Congratulations! You have learned the basics of Python programming. From writing simple scripts to handling user input and errors, you now have a solid foundation to explore more advanced topics like object-oriented programming, web development, and data science.</p><p><strong>Next Steps</strong><br>l&gt;</p><ul><li>Explore Python libraries like NumPy, Pandas, and Flask</li><li>Build small projects to strengthen your understanding</li><li>Join Python communities for support and learning</li></ul><p>Happy Codding!</p>]]></content:encoded>
            <pubDate>Fri, 28 Feb 2025 09:59:44 GMT</pubDate>
        </item>
        <item>
            <title>Hostinger Review 2025: Affordable and Reliable Web Hosting for All Needs</title>
            <link>https://cyfervoid.com/server/hostinger-review-2025-affordable-and-reliable-web-hosting-for-all-needs</link>
            <guid isPermaLink="true">https://cyfervoid.com/server/hostinger-review-2025-affordable-and-reliable-web-hosting-for-all-needs</guid>
            <description><![CDATA[Discover Hostinger's affordable pricing, reliable performance, and excellent customer support in our detailed 2025 review. Explore pros, cons, and hosting plans.]]></description>
            <content:encoded><![CDATA[<p>Hostinger has grown to become one of the most popular web hosting providers globally, known for its affordability, reliability, and user-friendly interface. With a range of hosting services including shared hosting, VPS hosting, and cloud hosting, Hostinger caters to businesses of all sizes, bloggers, and developers. Its competitive pricing, coupled with solid performance and excellent customer support, makes it a top choice for many.</p><p><strong>Pros:</strong></p><ul><li><strong>Affordable Pricing:</strong> Hostinger offers some of the most budget-friendly hosting plans without compromising on features.</li><li><strong>Fast Load Times:</strong> Consistently delivers fast website load speeds.</li><li><strong>User-Friendly Interface:</strong> An intuitive control panel with easy-to-use tools.</li><li><strong>Free Domain and SSL:</strong> Many plans come with a free domain name and SSL certificate.</li><li><strong>Excellent Customer Support:</strong> 24/7 live chat support with knowledgeable representatives.</li><li><strong>Multiple Data Centers:</strong> Servers located in the US, Europe, Asia, and South America.</li></ul><p><strong>Cons:</strong></p><ul><li><strong>No Phone Support:</strong> Customer support is only available via live chat.</li><li><strong>Limited Resources on Basic Plans:</strong> Entry-level plans have resource limits.</li><li><strong>Paid Backups on Basic Plans:</strong> Automated backups are not included in the cheapest plan.</li></ul><p class="mb-0"><strong>Hostinger VPS Hosting Plans and Features</strong></p><table class="table table-striped"><thead><tr><th width="55">Plan</th><th>Price/ Month</th><th>CPU Cores</th><th>RAM</th><th>Storage</th><th>Bandwidth</th><th>Managed/ Unmanaged</th><th>Key Features</th></tr></thead><tbody><tr><td>VPS 1</td><td>$3.99</td><td>1</td><td>1GB</td><td>20GB SSD</td><td>1TB</td><td>Unmanaged</td><td>Full root access, IPv6</td></tr><tr><td>VPS 2</td><td>$8.95</td><td>2</td><td>2GB</td><td>40GB SSD</td><td>2TB</td><td>Unmanaged</td><td>100 MB/s network</td></tr><tr><td>VPS 4</td><td>$12.95</td><td>4</td><td>4GB</td><td>80GB SSD</td><td>4TB</td><td>Unmanaged</td><td>Weekly backups</td></tr><tr><td>VPS 8</td><td>$29.95</td><td>8</td><td>16GB</td><td>250GB SSD</td><td>8TB</td><td>Unmanaged</td><td>Dedicated IP, 24/7 support</td></tr></tbody></table><p><br></p><p><strong>Performance</strong></p><p>Hostinger excels in performance with an average uptime of 99.9% and fast load times thanks to its use of LiteSpeed web servers and SSD storage. Its global data centers ensure that users experience minimal latency, no matter where they are located.</p><p><br></p><p><strong>Security</strong></p><p>Hostinger offers robust security measures including free SSL certificates, DDoS protection, daily or weekly backups (depending on the plan), and a web application firewall. Regular updates and proactive monitoring help keep websites secure.</p><p><br></p><p><strong>Customer Support</strong></p><p>Hostinger’s 24/7 customer support is available through live chat, providing quick and helpful responses. While there is no phone support, the extensive knowledge base and tutorials make troubleshooting easy.</p><p><br></p><p><strong>Why Choose Hostinger VPS Hosting?</strong></p><p>Hostinger stands out for its budget-friendly pricing without compromising on essential features. With scalable plans, robust performance, and a user-friendly control panel, it is a top choice for developers, small businesses, and bloggers.</p><p><br></p><p><strong>Verdict</strong></p><p>Hostinger stands out as an affordable yet reliable web hosting provider, perfect for small to medium-sized websites, startups, and individual bloggers. Its competitive pricing, excellent performance, and strong customer support make it a highly recommended choice in 2025. Although it has minor drawbacks like limited resources on basic plans and no phone support, its overall value is hard to beat.</p><hr><p>Whether you’re starting a new blog, setting up an e-commerce store, or looking for a reliable host for your business website, Hostinger offers a solid solution that won’t break the bank.</p><p><a href="https://shorturl.at/Fkn39">Sign up for Hostinger VPS hosting here</a></p>]]></content:encoded>
            <pubDate>Wed, 19 Feb 2025 03:33:47 GMT</pubDate>
        </item>
        <item>
            <title>Optimizing Ubuntu Server: Reduce Cache, Manage Logs &amp; Boost Performance</title>
            <link>https://cyfervoid.com/server/optimizing-ubuntu-server-reduce-cache-manage-logs-boost-performance</link>
            <guid isPermaLink="true">https://cyfervoid.com/server/optimizing-ubuntu-server-reduce-cache-manage-logs-boost-performance</guid>
            <description><![CDATA[Learn how to optimize your Ubuntu server by reducing cache, managing logs, and implementing essential performance enhancements. Improve speed and efficiency today!]]></description>
            <content:encoded><![CDATA[<p>Optimizing an Ubuntu server is essential for ensuring stability, security, and efficiency. Over time, caches, logs, and unused services can slow down your system. This guide provides practical tips to enhance your server’s performance by reducing cache, managing logs, and tweaking system settings.</p><h4>1. Keep Ubuntu Updated</h4><p>Regular updates ensure your system runs smoothly with security patches and performance improvements.</p><pre>sudo apt update &amp;&amp; sudo apt upgrade -y</pre><h4>2. Reduce Cache Usage</h4><div><strong>Clear APT Cache</strong></div><p>The APT package manager stores downloaded package files, which can consume disk space over time.</p><pre>sudo apt clean &amp;&amp; sudo apt autoclean</pre><p>To remove unnecessary packages:</p><pre>sudo apt autoremove -y</pre><div><strong>Clear System Cache</strong></div><p>To clear memory cache, execute:</p><pre>sudo sync; echo 3 | sudo tee /proc/sys/vm/drop_caches</pre><h4>3. Manage Logs Efficiently</h4><p>Ubuntu logs system events and can accumulate large log files over time.</p><div><strong>Limit Journal Logs</strong></div><p>Check the current log size:</p><pre>journalctl --disk-usage</pre><p>Set log retention limit (e.g., 100MB):</p><pre>sudo journalctl --vacuum-size=100M</pre><p>Limit logs to last 3 days:</p><pre>sudo journalctl --vacuum-time=3d</pre><div><strong>Rotate Logs with Logrotate</strong></div><p>Ensure logs are rotated and old logs are deleted by configuring Logrotate.</p><p>Edit the configuration:</p><pre>sudo nano /etc/logrotate.conf</pre><p>Modify settings such as:</p><pre>weekly
rotate 4
compress</pre><h4>4. Disable Unnecessary Services</h4><p>List enabled services:</p><pre>systemctl list-unit-files --type=service --state=enabled</pre><p>Disable unwanted services:</p><pre>sudo systemctl disable &lt;service_name&gt;</pre><h4>5. Optimize Swappiness</h4><p>Linux uses swap memory, which can slow down the system if overused. Reduce swappiness to prefer RAM usage:</p><pre>echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p</pre><h4>6. Use a Lightweight Web Server (Optional)</h4><p>If hosting a website, consider using Nginx instead of Apache for better performance:</p><pre>sudo apt install nginx -y</pre><h4>7. Monitor Server Performance</h4><p>Install htop to analyze CPU and RAM usage:</p><pre>sudo apt install htop -y
htop</pre><h4>8. Enable UFW Firewall for Security</h4><p>Ensure firewall protection with UFW (Uncomplicated Firewall):</p><pre>sudo ufw enable
sudo ufw allow ssh
sudo ufw status</pre><h4>9. Reduce Boot Time</h4><p>List services that slow down boot time:</p><pre>systemd-analyze blame</pre><p>Disable unnecessary startup services:</p><pre>sudo systemctl disable &lt;service_name&gt;</pre><h4>10. Optimize Disk Space</h4><p>Check disk usage:</p><pre>df -h</pre><p>Remove old kernels:</p><pre>sudo apt autoremove --purge</pre><p>Find and remove large unused files:</p><pre>sudo du -sh /var/log/*</pre><h4>Conclusion</h4><p>By implementing these optimizations, you can significantly improve your Ubuntu server’s efficiency, security, and speed. Regular maintenance ensures optimal performance over time. Keep monitoring your system and adjust settings as needed!</p>]]></content:encoded>
            <pubDate>Fri, 14 Feb 2025 03:37:30 GMT</pubDate>
        </item>
        <item>
            <title>Mastering HubSpot CMS Hub: A Comprehensive Guide to Custom Modules</title>
            <link>https://cyfervoid.com/web-development/mastering-hubspot-cms-hub-a-comprehensive-guide-to-custom-modules</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/mastering-hubspot-cms-hub-a-comprehensive-guide-to-custom-modules</guid>
            <description><![CDATA[Discover the power of HubSpot CMS Hub and learn how to create custom modules for highly personalized, dynamic websites. This tutorial walks you through the process, unlocking new possibilities for your web development projects.]]></description>
            <content:encoded><![CDATA[<p>Dive into the world of HubSpot CMS Hub with our step-by-step tutorial on creating custom modules. Transform your website’s capabilities and offer personalized experiences using HubSpot's powerful development tools. Ideal for developers and marketers aiming to enhance their digital presence.</p><p>In the rapidly evolving landscape of web development, personalization and dynamic content have become paramount. HubSpot CMS Hub offers powerful features that equip developers to create highly engaging and customized websites. One of the keys to unlocking this potential is mastering the creation of custom modules. Whether you're a seasoned developer or new to HubSpot, this guide will walk you through the essentials of building custom modules, enabling you to harness the full capabilities of the CMS Hub.</p><p><strong>Understanding HubSpot CMS and Custom Modules</strong></p><p>HubSpot CMS Hub is a versatile platform that combines content management with robust marketing tools. Custom modules are reusable blocks of code and design that allow developers to add unique functionality and design elements to a website. These modules are integrated seamlessly into HubSpot's drag-and-drop template builder, enabling greater flexibility in crafting personalized user experiences.</p><p><strong>Getting Started with HubSpot Custom Modules</strong></p><p>Before diving into module creation, ensure you have the necessary prerequisites:</p><ol><li><strong>HubSpot Account:</strong> You’ll need access to a HubSpot CMS Hub account.</li><li><strong>Developer Tools:</strong> HubSpot provides a local development workflow using the HubSpot CLI, which allows developers to work in local environments.</li><li><strong>Familiarity with HubL:</strong> HubSpot’s templating language, HubL, is crucial for developing modules. Understanding how to use HubL tags and filters will empower you to build dynamic content.</li></ol><p><strong>Step-by-Step Guide to Creating Custom Modules</strong></p><ol><li><p><strong>Set Up Your Development Environment:</strong></p><ul><li>Install the HubSpot CLI on your local machine.</li><li>Authenticate your CLI with HubSpot using your account's API key.</li><li>Create a local development server to preview your module changes before deploying them to the live site.<br><br></li></ul></li><li><p><strong>Define Your Module:</strong></p><ul><li>Start by creating a new module file in your HubSpot design manager.</li><li>Use HTML, CSS, and HubL to define the layout and style of your module.</li><li>Incorporate conditional logic using HubL to dynamically render content based on user interactions or data inputs.<br><br></li></ul></li><li><p><strong>Add Fields to Your Module:</strong></p><ul><li>Utilize HubSpot’s module editor to add fields such as text inputs, image selectors, and dropdowns, enabling users to customize the module content.</li><li>Configure default values and validation rules to ensure consistent and reliable user input.<br><br></li></ul></li><li><p><strong>Test Your Module:</strong></p><ul><li>Preview your module in the HubSpot test environment to ensure it behaves as expected.</li><li>Use A/B testing and responsive design techniques to optimize your module for various devices and screen sizes.<br><br></li></ul></li><li><p><strong>Deploy and Integrate:</strong></p><ul><li>Once tested, deploy your module to the live site.</li><li>Integrate the module into existing or new HubSpot templates, allowing content creators to easily include it in their pages.</li></ul></li></ol><p><strong>Leveraging HubSpot API for Advanced Customizations</strong></p><p>For those looking to push their HubSpot CMS Hub capabilities further, integrating the HubSpot API opens doors to advanced customizations. By connecting external data sources or third-party services, developers can create truly dynamic and connected experiences. The HubSpot API allows for operations such as fetching CRM data, triggering workflows, or interacting with marketing automation features directly within your custom module.</p><p><strong>Conclusion</strong></p><p>Mastering custom modules in HubSpot CMS Hub is a gateway to creating powerful, personalized websites that can drive engagement and conversions. By following this guide, developers can efficiently extend their web projects’ capabilities, delivering tailored experiences that stand out in today’s competitive digital marketplace. Explore the depth of HubSpot’s development environment and start building innovative web solutions today.</p>]]></content:encoded>
            <pubDate>Wed, 12 Feb 2025 23:15:19 GMT</pubDate>
        </item>
        <item>
            <title>Exploring Micro-Frontends: The Future of Scalable Web Development</title>
            <link>https://cyfervoid.com/web-development/exploring-micro-frontends-the-future-of-scalable-web-development</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/exploring-micro-frontends-the-future-of-scalable-web-development</guid>
            <description><![CDATA[Discover how micro-frontends are revolutionizing scalable web development. This guide explores the benefits, architecture, and implementation strategies of micro-frontends.]]></description>
            <content:encoded><![CDATA[<p>Micro-frontends are reshaping web development by allowing teams to scale projects efficiently while maintaining modularity. This article delves into the advantages and implementation of micro-frontends, empowering developers to create scalable, maintainable, and flexible web applications.</p><p>As web applications grow more complex, the need for modular and scalable architectures becomes increasingly pressing. Enter micro-frontends—a burgeoning architectural trend that enables developers to organize code in a way that maximizes flexibility and minimizes overhead. In this article, we'll explore micro-frontends in depth, examining their benefit to modern web development, their architectural setup, and best practices for implementation.</p><h3 id="what-are-micro-frontends-">What Are Micro-Frontends?</h3><p>Micro-frontends extend the concepts behind microservices to the frontend development realm. Traditionally, web applications have been built as monolithic structures, meaning all the frontend code was bundled together. As these applications grow, so does their complexity, making it challenging to maintain or scale them efficiently. Micro-frontends aim to solve this problem by decomposing the frontend into smaller, manageable pieces or "micro-apps," each running its own codebase.</p><h3 id="benefits-of-micro-frontends">Benefits of Micro-Frontends</h3><ol><li><p><strong>Independent Deployability:</strong> Each micro-frontend can be developed, tested, and deployed independently. This reduces the dependency bottleneck often seen in monolithic applications, speeding up release cycles.</p></li><li><p><strong>Scalability:</strong> Different teams can work on different micro-frontends simultaneously without stepping on each other's toes, allowing large applications to scale more easily.</p></li><li><p><strong>Technological Diversity:</strong> Teams have the freedom to choose different technologies and frameworks for different parts of the application, allowing them to adopt new tools that best fit specific needs.</p></li><li><p><strong>Improved Maintainability:</strong> Breaking down applications into smaller parts means that each micro-frontend can be maintained independently, making applications more resilient and adaptable to change.</p></li></ol><h3 id="implementing-micro-frontends">Implementing Micro-Frontends</h3><p>Implementing a micro-frontend architecture requires careful consideration to balance independence and integration. Here's a step-by-step approach to getting started:</p><ol><li><p><strong>Define Your Boundaries:</strong> Determine how to split your application into micro-frontends. It can be feature-based, page-based, or function-based depending on the application's needs.</p></li><li><p><strong>Choose a Composition Strategy:</strong> Options include runtime integration using iframes or JavaScript-based Service Composition and build time integration using frameworks like Webpack Module Federation.</p></li><li><p><strong>Ensure Consistent Communication:</strong> Micro-frontends must interact seamlessly. Event Bus or custom APIs can facilitate interactions while ensuring each micro-app remains loosely coupled.</p></li><li><p><strong>Implement Shared Resources Carefully:</strong> If certain resources or style guides must be shared, consider creating a shared library that can be versioned and consumed by all micro-frontends.</p></li><li><p><strong>Automate Deployment and Monitoring:</strong> Automate pipelines for each micro-frontend and implement monitoring to keep track of their performance and integration health.</p></li></ol><h3 id="challenges-and-considerations">Challenges and Considerations</h3><p>While micro-frontends offer many advantages, they aren't without challenges. Teams must handle greater operational complexity, ensure UI consistency across microfrontends, and manage potential performance issues arising from multiple frontend frameworks.</p><h3 id="conclusion">Conclusion</h3><p>Micro-frontends represent a significant evolution in web architecture, particularly for complex applications that demand scalability and flexibility. By carefully designing and implementing a micro-frontend architecture, developers can create robust applications that not only perform well today but can also adapt to future technology landscapes. Embracing this trend could be the key to unlocking a more agile and resilient web development strategy.</p>]]></content:encoded>
            <pubDate>Wed, 05 Feb 2025 17:18:05 GMT</pubDate>
        </item>
        <item>
            <title>Host Your Website from Your Desktop Using Packetriot</title>
            <link>https://cyfervoid.com/server/host-your-website-from-your-desktop-using-packetriot</link>
            <guid isPermaLink="true">https://cyfervoid.com/server/host-your-website-from-your-desktop-using-packetriot</guid>
            <description><![CDATA[Learn how to host your website directly from your desktop using PacketRiot, a powerful tool that enables seamless web hosting solutions. Discover the benefits of self-hosting and take control of your online presence effortlessly.]]></description>
            <content:encoded><![CDATA[<p id="isPasted">In this guide, we will explore how you can host your website directly from your desktop using Packetriot. By the end of this tutorial, you'll have your own self-hosted website up and running, accessible to anyone with an internet connection. So, let's dive in and get started!</p><p>This tutorial assumes that you already have a web server and a running website locally and you only need to make it available to the world.</p><p>First is create a packetriot account as you will going it for authentication later.</p><p>Second is download the right variation of packetriot for your machine here: https://packetriot.com/downloads</p><p>Extract it to any directory of your choice, in this example we will extract it to <strong>D</strong><strong>:/Application/Packetriot/</strong></p><p>Next is add it to your system variable so you can use packetriot on any directory.</p><p><img src="https://www.cyfervoid.com/assets/img/system-variable.png" style="max-width:100%;"></p><p>After adding it to your system variable, try it in your windows terminal to check if everything is working.</p><pre>pktriot version</pre><p><img src="https://www.cyfervoid.com/assets/img/cmd.png"></p><p>You should see this response if you have successfully added packetriot in your environment system.</p><p>Now the exciting part is to configure the packetriot to make your website available to the world</p><p>Type in this<strong>&nbsp;</strong>in your terminal, <strong id="isPasted">pktriot configure</strong></p><p>Then select configuration file directory (packetriot will ask and guide you these during the process)</p><p>Then login your packetriot account</p><p>Then select a region (select your region so it'll be more optimal and load faster)</p><p>After that you should see a hostname provided for you by packetriot</p><p>Next is to expose your localserver, to do that <span style="background-color: transparent;">just type in these into your terminal and hit enter</span></p><pre>pktriot tunnel http add --domain  <strong>{hosted-provided-by-packetriot}</strong> --destination localhost --http 80 --letsencrypt</pre><p>Now you should be able to access your localhost through the hostname that packetriot provided to you.</p><p>Now if you have a custom domain, what you need to do is just type in the same command but instead of hostname that packetriot provided to you, use your domain instead.</p><pre id="isPasted">pktriot tunnel http add --domain  yourcustomdomain.com --destination localhost --http 80 --letsencrypt</pre><p>Now login to your domain manager and add a cname record, use your hostname that packetriot provided for you</p><p><img src="https://www.cyfervoid.com/assets/img/cname.png"></p><p>Also you should add that custom domain in packetriot, login your packetriot into their website and add your domain.</p><p>You also need verify it, packetriot will provided you a guide and a TXT record to put in your domain manager to verify that you're the owner of the domain.</p><p>After that you should be able to see your website to that custom domain.</p>]]></content:encoded>
            <pubDate>Sun, 06 Aug 2023 14:26:03 GMT</pubDate>
        </item>
        <item>
            <title>How to create a custom order status in woocommerce!</title>
            <link>https://cyfervoid.com/web-development/how-to-create-a-custom-order-status-in-woocommerce</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/how-to-create-a-custom-order-status-in-woocommerce</guid>
            <description><![CDATA[Learn how to make and customize a wordpress child theme.]]></description>
            <content:encoded><![CDATA[<p>Woocommerce has 7 order statuses the moment you install it in your wordpress website(pending, failed, on-hold, cancelled, refunded and completed). These statuses are enough for an ecommerce website&rsquo;s order processes but some might want to add more steps on it.</p><p>My client wanted to add a shipped order status because they want their customers be notified when the item(s) they&rsquo;ve bought are being shipped.</p><p>This code will check the order status shipped and if it doesn&rsquo;t exists, it will going to add shipped on order status drop-down list.</p><pre class="wp-block-code"><code>add_action( &#39;init&#39;, function() {
    $term = get_term_by( &#39;name&#39;, &#39;shipped&#39;, &#39;shop_order_status&#39; );
    if ( ! $term ) {
        wp_insert_term( &#39;shipped&#39;, &#39;shop_order_status&#39; );
    }
} );</code></pre><p>You&rsquo;ll be surprised seeing your custom order status added there.</p><p>Our next step is to make it look cool when the order status is shipped.</p><p>The code below will let you insert anything in the head tag of your wordpress backend and we&rsquo;re going to use it to insert our css.</p><pre class="wp-block-code"><code>function insert_new_css() {
   echo &#39;&lt;style&gt;
   .shipped.tips { background: url(&quot;&#39;.get_stylesheet_directory_uri().&#39;/images/shipped.png&quot;) no-repeat scroll 50% center rgb(45, 178, 0) !important; }
   &lt;/style&gt;&#39;;
}
add_action(&#39;admin_head&#39;, &#39;insert_new_css&#39;);</code></pre><p>This is the image I used.&nbsp;<img src="https://www.cyfervoid.com/uploads/2019/09/14/shipped.png" alt="" class="fr-fic fr-dii"></p><figure class="wp-block-image size-full"><img src="http://wp.test/wp-content/uploads/2022/06/image-4.png" alt="" class="wp-image-210 fr-fic fr-dii"></figure><p>Now try to change the status of one of the order to shipped and look the result of it.</p><p>Great right?</p><p>Our next goal is to add shipped order status in the bulk actions, so you can change multiple order status at once.</p><figure class="wp-block-image"><img src="https://www.cyfervoid.com/uploads/2019/09/14/bulk-action.jpg" alt="" class="fr-fic fr-dii"></figure><p>The code below will add the Mark as Shipped in bulk actions below the Mark as completed.</p><pre class="wp-block-code"><code>add_action(&#39;admin_footer-edit.php&#39;, &#39;custom_bulk_admin_footer&#39;);
function custom_bulk_admin_footer() {
 
  global $post_type;
 
  if($post_type == &#39;shop_order&#39;) {
    ?&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
      jQuery(document).ready(function() {
        jQuery(&#39;&lt;option&gt;&#39;).val(&#39;shipped&#39;).text(&#39;&lt;?php _e(&#39;Mark as Shipped&#39;)?&gt;&#39;).appendTo(&quot;select[name=&#39;action&#39;]&quot;);
        jQuery(&#39;&lt;option&gt;&#39;).val(&#39;shipped&#39;).text(&#39;&lt;?php _e(&#39;Mark as Shipped&#39;)?&gt;&#39;).appendTo(&quot;select[name=&#39;action2&#39;]&quot;);
      });
    &lt;/script&gt;
    &lt;?php
  }
}</code></pre><p>The last part is to add a function to it, like email the customer that his order is being shipped.</p><p>This is the content of the email that will be sent to the customer</p><pre class="wp-block-code"><code>function send_this($email) {

	$headers = &#39;From: My Store &lt;noreply@mystore.com&gt;&#39; . &quot;\r\n&quot;;
	$headers .= &quot;MIME-Version: 1.0\r\n&quot;;
	$headers .= &quot;Content-Type: text/html; charset=ISO-8859-1\r\n&quot;;
	
	$subject = &#39;Your Order has been shipped&#39;;

	$message = &#39;&lt;p&gt;&lt;strong&gt;Shipping Confirmation&lt;/strong&gt;&lt;br /&gt;
	Your order has been shipped and is currently in transit.&lt;/p&gt;
	&lt;small&gt;If you have not received your order in 7 business days, please send us an email at &lt;a href=&quot;mailto:info@mystore.com&quot;&gt;info@mystore.com&lt;/a&gt;&lt;/small&gt;&#39;;	
	
	wp_mail( $email, $subject, $message, $headers ); 
}</code></pre><p>This is the code that will update the order status.</p><pre class="wp-block-code"><code>function change_order_status($orderid) {
	$order = new WC_Order($orderid);
	$email = get_post_meta( $orderid, &#39;_billing_email&#39; )[0];
	if($order-&gt;status!=&#39;shipped&#39;) {
		$order-&gt;update_status(&#39;shipped&#39;, &#39;order_note&#39;);
		send_this($email);
	}
}</code></pre><p>The function for the bulk actions.</p><pre class="wp-block-code"><code>add_action(&#39;load-edit.php&#39;, &#39;custom_bulk_action&#39;);
function custom_bulk_action() {
	global $typenow;
	$post_type = $typenow;
	$sendback = admin_url( &quot;edit.php?post_type=$post_type&amp;success=1&quot; );
	
	if($post_type == &#39;shop_order&#39;) {
		$wp_list_table = _get_list_table(&#39;WP_Posts_List_Table&#39;);
		$action = $wp_list_table-&gt;current_action();
		$allowed_actions = array(&quot;shipped&quot;);
		if(!in_array($action, $allowed_actions)) return;
		
		if(isset($_REQUEST[&#39;post&#39;])) {
			$orderids = array_map(&#39;intval&#39;, $_REQUEST[&#39;post&#39;]);
		}
		
		
		switch($action) {
			case &quot;shipped&quot;:
				foreach( $orderids as $orderid ) {
					change_order_status($orderid);
				}
			break;
			default: return;
		}
		
		wp_redirect($sendback);
		exit();
	}
}</code></pre><p>The function for saving the order status individually.</p><pre class="wp-block-code"><code>add_action( &#39;woocommerce_order_status_shipped&#39;, &#39;order_status_shipped_custom&#39;);
function order_status_shipped_custom($orderid) {
	change_order_status($orderid);
}</code></pre><p>The function to display a successful message.</p><pre class="wp-block-code"><code>add_action(&#39;admin_notices&#39;, &#39;custom_bulk_admin_notices&#39;);
function custom_bulk_admin_notices() {
  global $post_type, $pagenow;
  if( $post_type == &#39;shop_order&#39; &amp;&amp; isset($_GET[&#39;success&#39;]) ) {
    echo &#39;&lt;div class=&quot;updated&quot;&gt;&lt;p&gt;The orders have been successfully shipped!&lt;/p&gt;&lt;/div&gt;&#39;;
  }
}</code></pre><p>That&rsquo;s it! You now have a new status in your woocommerce website!</p>]]></content:encoded>
            <pubDate>Tue, 08 Sep 2020 02:16:45 GMT</pubDate>
        </item>
        <item>
            <title>How to display a custom product attributes in magento’s transactional email</title>
            <link>https://cyfervoid.com/web-development/how-to-display-a-custom-product-attributes-in-magentos-transactional-email</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/how-to-display-a-custom-product-attributes-in-magentos-transactional-email</guid>
            <description><![CDATA[How to display a custom product attributes in magento’s transactional email.]]></description>
            <content:encoded><![CDATA[<p>For a brief information, <span style="color: rgb(32, 33, 36); font-family: arial, sans-serif; font-size: 16px; white-space: normal;">transactional email is&nbsp;</span><b style="color: rgb(32, 33, 36); font-family: arial, sans-serif; font-size: 16px; white-space: normal;">an email that is sent to an individual recipient following a commercial transaction or specific action performed by that person</b><span style="color: rgb(32, 33, 36); font-family: arial, sans-serif; font-size: 16px; white-space: normal;">.</span> And now you want to add the custom attribute you created in the email that is being sent to all users after the purchase.</p><p>Here&rsquo;s the file you need to update.</p><pre class="wp-block-code"><code>app/design/frontend/<strong>[replacewithyourtemplate]</strong>/default&lt;/strong&gt;/template/email/order/items/order/default.phtml
</code></pre><p>Find this code in that file</p><pre class="wp-block-code"><code>&lt;?php $_item = $this-&gt;getItem() ?&gt;
&lt;?php $_order = $this-&gt;getItem()-&gt;getOrder() ?&gt;</code></pre><p>Then add this code below next to it.</p><pre class="wp-block-code"><code>&lt;?php 
$productId = $_item-&gt;getProduct()-&gt;getId(); 
$product = Mage::getModel(&#39;catalog/product&#39;)-&gt;load($productId);
$attributes = $product-&gt;getAttributes(); // &lt;--- load all the attribute of the product
$attribute_list = array(&#39;<strong>yourcustomattribute</strong>&#39;); // &lt;--- this is the product attirbute you want to display
?&gt;</code></pre><p>Then here&rsquo;s the code that will display the custom attributes. You can place this anywhere you want it to display.</p><p>In my end, I place it below the SKU.</p><pre class="wp-block-code"><code>&lt;?php 
foreach ($attributes as $attribute) {
    $attributeCode = $attribute-&gt;getAttributeCode();
    if(!in_array($attributeCode, $dispAttribs)) continue;
    $label = $attribute-&gt;getFrontend()-&gt;getLabel($product);
    $value = $attribute-&gt;getFrontend()-&gt;getValue($product);
    echo &quot;&lt;p&gt;&lt;strong&gt;&quot;.  $this-&gt;escapeHtml( $label ) .&quot;:&lt;/strong&gt; &quot; . $this-&gt;escapeHtml($value) . &quot;&lt;/p&gt;&quot;;
}
?&gt;
</code></pre><p>You can also try this method instead of going through the code above, however you might encountered some issue but still worthy to experiment. In my end it did not displayed on an actual email but working on the test mail.</p><pre class="wp-block-code"><code>&lt;p&gt;
&lt;strong&gt;Attribute Label: &lt;/strong&gt; 
&lt;?php echo $this-&gt;escapeHtml($_item-&gt;getProduct()-&gt;getData(&#39;<strong>customattribute</strong>&#39;)); ?&gt;&lt;/p&gt;</code></pre><p>For convenience, I&rsquo;ve included a source code for you to be able to test it without going through the actual purchase in magento.</p><p>Just create a file mailtest.php in your magento root directory.</p><pre class="wp-block-code"><code>&lt;?php 
require_once &#39;app/Mage.php&#39;;
Mage::app();
// loads the proper email template
$emailTemplate  = Mage::getModel(&#39;core/email_template&#39;)-&gt;loadDefault(&#39;sales_email_order_template&#39;);</code></pre><pre class="wp-block-code"><code>// All variables your error log tells you that are missing can be placed like this:
$emailTemplateVars = array();
$emailTemplateVars[&#39;usermessage&#39;] = &quot;blub&quot;;
$emailTemplateVars[&#39;store&#39;] = Mage::app()-&gt;getStore();
$emailTemplateVars[&#39;sendername&#39;] = &#39;sender name&#39;;
$emailTemplateVars[&#39;receivername&#39;] = &#39;receiver name&#39;; </code></pre><pre class="wp-block-code"><code>// order you want to load by ID
$id = isset($_GET[&#39;id&#39;]) ? $_GET[&#39;id&#39;] : 1; // this is for you to select order dynamically by just adding id parameter
$emailTemplateVars[&#39;order&#39;] = Mage::getModel(&#39;sales/order&#39;)-&gt;load($id); </code></pre><pre class="wp-block-code"><code>// load payment details:
// usually rendered by this template:
// web/app/design/frontend/base/default/template/payment/info/default.phtml
$order = $emailTemplateVars[&#39;order&#39;];
$paymentBlock = Mage::helper(&#39;payment&#39;)-&gt;getInfoBlock($order-&gt;getPayment())-&gt;setIsSecureMode(true);
$paymentBlock-&gt;getMethod()-&gt;setStore(Mage::app()-&gt;getStore());  </code></pre><pre class="wp-block-code"><code>$emailTemplateVars[&#39;payment_html&#39;] = $paymentBlock-&gt;toHtml();
</code></pre><pre class="wp-block-code"><code>//displays the rendered email template
echo $emailTemplate-&gt;getProcessedTemplate($emailTemplateVars);</code></pre><p>Now view the php file you&rsquo;ve just created in the browser.</p><p>www.yourmagentosite.com/mailtest.php</p>]]></content:encoded>
            <pubDate>Sat, 14 Sep 2019 23:48:22 GMT</pubDate>
        </item>
        <item>
            <title>How to install phpPgAdmin</title>
            <link>https://cyfervoid.com/web-development/how-to-install-phppgadmin</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/how-to-install-phppgadmin</guid>
            <description><![CDATA[Learn how to install phppgadmin for your postgresql.]]></description>
            <content:encoded><![CDATA[<p>phpPgAdmin is a database administration tool dedicated for PostgreSQL, much like phpmyadmin for mySQL. It&rsquo;s a great tool which will help you manage your database without installing other client app in your system.</p><p>This tutorial was applicable only to those who already have installed postgre on the server.</p><p><strong>First is download the phppgadmin files</strong></p><p>You can download it by cloning it in their repository</p><pre class="wp-block-code"><code>cd /path/to/your/www
git clone git://github.com/phppgadmin/phppgadmin.git <strong>pgadmin</strong></code></pre><p>Manual download is also available here <a href="http://phppgadmin.sourceforge.net/doku.php?id=download">http://phppgadmin.sourceforge.net/doku.php?id=download</a>. Upload and extract it in your server.</p><p><strong>Nex is to update the configuration</strong></p><p>Copy the file <strong>config.inc.php-dist</strong> to <strong>config.inc.php</strong> from this directory <strong>/path/to/your/www/pgadmin/conf/</strong></p><p>Open the <strong>config.inc.php</strong> you just copied, find and update this line of code</p><pre class="wp-block-code"><code>$conf[&#39;servers&#39;][0][&#39;host&#39;] = &#39;&#39;;</code></pre><p>to</p><pre class="wp-block-code"><code>$conf[&#39;servers&#39;][0][&#39;host&#39;] = &#39;localhost&#39;;</code></pre><p>For instance that you have a different port then replace the default port 5432 to the one you have.</p><p>Now you can access and manage your database using it.</p><p>http://to_your_server/<strong>pgadmin</strong></p>]]></content:encoded>
            <pubDate>Sat, 29 Jun 2019 20:46:58 GMT</pubDate>
        </item>
        <item>
            <title>Woocommerce Update User Profile with Upload Photo</title>
            <link>https://cyfervoid.com/web-development/woocommerce-update-user-profile-with-upload-photo</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/woocommerce-update-user-profile-with-upload-photo</guid>
            <description><![CDATA[Add a feature to woocommerce to upload a photo or avatar.]]></description>
            <content:encoded><![CDATA[<p>Woocommerce allows customers to update their profile information but updating their user profile photo is not included. This post will add that feature to your woocommerce website!</p><p>Just add these code snippets into theme&rsquo;s <strong>functions.php</strong></p><p>This is to make the woocommerce form to upload a file.</p><pre class="wp-block-code"><code>add_action(&#39;woocommerce_edit_account_form_tag&#39;,function(){
	echo &#39; enctype=&quot;multipart/form-data&quot;&#39;;
});</code></pre><p>Second is to add the upload photo field in the form.</p><pre class="wp-block-code"><code>add_action(&#39;woocommerce_edit_account_form_start&#39;,function(){
	?&gt;
	&lt;p&gt;&lt;label for=&quot;photo&quot;&gt;Photo&lt;/label&gt;&lt;input type=&quot;file&quot; id=&quot;photo&quot; name=&quot;photo&quot; /&gt;&lt;/p&gt;
	&lt;?php
});</code></pre><p>Third is the function that will process to save the uploaded photo. <em>Please note that you still need to add a validation to only accept image.</em></p><pre class="wp-block-code"><code>add_action(&#39;woocommerce_save_account_details&#39;,function( $user_id ){
	if ( ! function_exists( &#39;wp_handle_upload&#39; ) ) {
	    require_once( ABSPATH . &#39;wp-admin/includes/file.php&#39; );
	}
	$uploadedfile = $_FILES[&#39;photo&#39;];
	$movefile = wp_handle_upload( $uploadedfile, array(&#39;test_form&#39; =&gt; FALSE) );
	if ( $movefile &amp;&amp; !isset( $movefile[&#39;error&#39;] ) ) {
	  update_user_meta($user_id, &#39;avatar&#39;, $movefile[&#39;url&#39;]) 
	  or add_user_meta($user_id, &#39;avatar&#39;, $movefile[&#39;url&#39;]);
	} else {
	    echo $movefile[&#39;error&#39;];
	}
});</code></pre><p>Our final step is to overwrite the avatar using filter.</p><pre class="wp-block-code"><code>add_filter (&#39;get_avatar&#39;, function($avatar_html, $id_or_email, $size, $default, $alt) {
	$avatar = get_user_meta($id_or_email,&#39;avatar&#39;,true);
	if( $avatar ) {
		return &#39;&lt;img src=&quot;&#39;.$avatar.&#39;&quot; width=&quot;96&quot; height=&quot;96&quot; alt=&quot;Avatar&quot; class=&quot;avatar avatar-96 wp-user-avatar wp-user-avatar-96 photo avatar-default&quot; /&gt;&#39;;
	} else {
		return $avatar_html;
	}
}, 10, 5);</code></pre><p>That&rsquo;s it! You have now an upload photo feature in your woocommerce website!</p>]]></content:encoded>
            <pubDate>Wed, 01 May 2019 02:47:30 GMT</pubDate>
        </item>
        <item>
            <title>Create an auto height textarea using jQuery</title>
            <link>https://cyfervoid.com/web-development/create-an-auto-height-textarea-using-jquery</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/create-an-auto-height-textarea-using-jquery</guid>
            <description><![CDATA[A simple tip and trick to have your textarea auto resize its height based on its content]]></description>
            <content:encoded><![CDATA[<p>Good UX for website form is one of the key factor to increase the conversion rate of the website. One of it is by making your form minimal or making it form step or anything to make it look not too overwhelming.</p><p>But let say you have a single page form with lots of textarea? One thing you could maybe do, is to make it look slick by adjusting the height of textarea a little smaller however, when user put long text in it, the textarea would probably have scrollbar. Would it be cool to have it automatically increase depending how long the text the user is trying to put?</p><p>Here&#39;s how you can do it.</p><p>Let&#39;s start with a basic textarea.</p><pre class="wp-block-code"><code>&lt;textarea class=&quot;js-textarea-auto&quot;&gt;&lt;/textarea&gt;
</code></pre><p>And a sample css that sets the mininum height to the textarea.</p><pre class="wp-block-code"><code>.js-textarea-auto { min-height:50px; resize:none; overflow:hidden; }
</code></pre><p>Then lastly the jQuery</p><pre class="wp-block-code"><code>$(&#39;.js-textarea-auto&#39;).on(&#39;keyup&#39;,function(e){
	if( $(this).outerHeight() &gt; $(this).prop(&#39;scrollHeight&#39;)) {
		$(this).outerHeight(5);
	}
	$(this).outerHeight($(this).prop(&#39;scrollHeight&#39;));
});</code></pre><p>Now if you&#39;re not using jquery, here&rsquo;s a pure javascript you can use instead.</p><pre class="wp-block-code"><code>let textareas = document.querySelectorAll(&#39;.js-textarea-auto&#39;);
textareas.forEach(elm=&gt;{
	elm.addEventListener(&#39;keyup&#39;, function(e){
		if( this.offsetHeight &gt; this.scrollHeight) {
			this.style.height=`5px`;
		}
		this.style.height=`${this.scrollHeight}px`;
	})
})</code></pre>]]></content:encoded>
            <pubDate>Fri, 22 Mar 2019 01:51:40 GMT</pubDate>
        </item>
        <item>
            <title>How to create a virtual page in wordpress</title>
            <link>https://cyfervoid.com/web-development/how-to-create-a-virtual-page-in-wordpress</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/how-to-create-a-virtual-page-in-wordpress</guid>
            <description><![CDATA[Learn how to create a page that is not relying on creating a page on wordpress dashboard.]]></description>
            <content:encoded><![CDATA[<p>There&#39;s a lot of ways to create a virtual page in wordpress. And this one would be the simplest method to achieve it.</p><p>Just add this in <strong>functions.php</strong> from the theme that is currently being used in wordpress.</p><p>First is to add a query variable which will be used later as identifier.</p><pre class="wp-block-code"><code>add_action(&#39;query_vars&#39;,&#39;set_query_var&#39;);
function set_query_var($vars) {
  array_push($vars, &#39;custom_page&#39;);
  return $vars;
}</code></pre><p>Next is to add a custom rewrite rule, which will tells wordpress to add value to variable custom_page, when desired slug is visited, e.g. domain.com/<strong>custom</strong></p><pre class="wp-block-code"><code>add_action(&#39;init&#39;, &#39;custom_add_rewrite_rule&#39;);
function custom_add_rewrite_rule(){
  add_rewrite_rule(&#39;^<strong>custom</strong>$&#39;,&#39;index.php?<strong>custom_page=1</strong>&#39;,&#39;top&#39;);
  flush_rewrite_rules(); // ideally, this one should be removed once everything is okay
}</code></pre><p>Next is to change what template file to load whenever the variable custom_page is set.</p><pre class="wp-block-code"><code>add_filter(&#39;template_include&#39;, &#39;plugin_include_template&#39;);
function plugin_include_template($template){
  if(get_query_var(&#39;custom_page&#39;)){
  	$template = get_template_directory() .&quot;/templates/custom.php&quot;;
  }    
  return $template;    
}</code></pre><p>Then the last thing is to create the file inside the theme that you want to load, e.g [yourtheme]/templates/custom.php</p><p>That&#39;s it! Happy coding.</p>]]></content:encoded>
            <pubDate>Fri, 01 Feb 2019 11:33:47 GMT</pubDate>
        </item>
        <item>
            <title>Adding product type column in manage categories in category product tab</title>
            <link>https://cyfervoid.com/web-development/adding-product-type-column-in-manage-categories-in-category-product-tab</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/adding-product-type-column-in-manage-categories-in-category-product-tab</guid>
            <description><![CDATA[Learn how to add a product type column in magento&#039;s manage categories in category product tab.]]></description>
            <content:encoded><![CDATA[<p>Magento is one of popular the platform for ecommerce, packed with features that the sellers need. But even with all of its features to offer, some clients can always come up of another idea of feature.</p><p>Since most of their products are grouped, finding a product they wanted to in a category is giving them a hard time. So they asked for another column where they can use to filter. In my case was to add product type column.</p><p>Sharing is caring so here&rsquo;s how I did it.</p><p>The file that you need to modify for the category product is located in</p><pre class="wp-block-code"><code>/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php
</code></pre><p>Simply create a local copy of it, so that it will not be affected whenever magento is updated.</p><pre class="wp-block-code"><code>/app/code/local/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php
</code></pre><p>Now lets start editing this file.</p><p>Find&nbsp;<strong>_prepareCollection</strong> function and add this one line of code</p><pre class="wp-block-code"><code>-&gt;addAttributeToSelect(&#39;type_id&#39;)
</code></pre><p>add this next to price or in any order, doesn&rsquo;t matter anyway</p><pre class="wp-block-code"><code>-&gt;addAttributeToSelect(&#39;sku&#39;)
-&gt;addAttributeToSelect(&#39;price&#39;)
-&gt;addAttributeToSelect(&#39;type_id&#39;)</code></pre><p>Next is in the&nbsp;<strong>_prepareColumns</strong> function and add this piece of code</p><pre class="wp-block-code"><code>$this-&gt;addColumn(&#39;type&#39;,
array(
&#39;header&#39;=&gt; Mage::helper(&#39;catalog&#39;)-&gt;__(&#39;Type&#39;),
&#39;width&#39; =&gt; &#39;120&#39;,
&#39;index&#39; =&gt; &#39;type_id&#39;,
&#39;type&#39; =&gt; &#39;options&#39;,
&#39;options&#39; =&gt; Mage::getSingleton(&#39;catalog/product_type&#39;)-&gt;getOptionArray(),
));</code></pre><p>In my end I&rsquo;ve added it next to</p><pre class="wp-block-code"><code>$this-&gt;addColumn(&#39;name&#39;, array(
	&#39;header&#39; =&gt; Mage::helper(&#39;catalog&#39;)-&gt;__(&#39;Name&#39;),
	&#39;index&#39; =&gt; &#39;name&#39;
));</code></pre><p>After doing the steps above, just re-index your site to see the result.</p><p>From this</p><figure class="wp-block-image size-full"><img src="http://wp.test/wp-content/uploads/2022/06/image-2.png" alt="" class="wp-image-187 fr-fic fr-dii"></figure><p>To this</p><figure class="wp-block-image size-full"><img src="http://wp.test/wp-content/uploads/2022/06/image-3.png" alt="" class="wp-image-188 fr-fic fr-dii"></figure><p>That&rsquo;s it! Happy coding.</p>]]></content:encoded>
            <pubDate>Tue, 29 Jan 2019 21:03:59 GMT</pubDate>
        </item>
        <item>
            <title>Woocommerce product is not purchasable</title>
            <link>https://cyfervoid.com/web-development/woocommerce-product-is-not-purchasable</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/woocommerce-product-is-not-purchasable</guid>
            <description><![CDATA[Learn how to fix the woocommerce&#039;s product is not purchasable issue.]]></description>
            <content:encoded><![CDATA[<p>This issue often to happen when you add a product programmatically. Probably the third party api source where the product are coming, have an empty price.</p><p>To fix it, you just have to edit each product and set a default price, however given that it is coming from an API or other source, you might already have created hundred or thousand products.</p><p>So the easy solution was to set a default price through code, so it&#39;ll be applied to all products.</p><pre><code>function wc_default_price($price) {
	if(empty($price) || $price == null || $price == &quot;&quot;) {
		$price = 0;
	}
	return $price;
}

add_filter(&#39;woocommerce_get_price&#39;,&#39;wc_default_price&#39;, 10,1);</code></pre><p>That&#39;s it! Product should now be purchasable.</p>]]></content:encoded>
            <pubDate>Mon, 28 Jan 2019 19:03:56 GMT</pubDate>
        </item>
        <item>
            <title>Laravel FormRequest Custom Validation Response</title>
            <link>https://cyfervoid.com/web-development/laravel-formrequest-custom-validation-response</link>
            <guid isPermaLink="true">https://cyfervoid.com/web-development/laravel-formrequest-custom-validation-response</guid>
            <description><![CDATA[Learn how to customize the response of Laravel FormRequest Validation]]></description>
            <content:encoded><![CDATA[<p>Laravel's FormRequest validation was very ideal on building a restAPI, as you can customize how or what you wanted it to response.</p><p>Here's how you can customize the response of it.</p><p>Here in our example, we will be building a login/authentication restAPI so we will begin creating the files we're about to modify. <em>Please note that our example focus mainly on how to override the response of formrequest and is not a fully functional login api.</em></p><p>LoginController</p><pre class="wp-block-code"><code>php artisan make:controller LoginController
</code></pre><p>LoginRequest</p><pre class="wp-block-code"><code>php artisan make:request LoginRequest</code></pre><p>Now let's begin with <strong>LoginController.php</strong> located at <strong>app\Http\Controllers</strong> and replace the code using below.</p><pre class="wp-block-code"><code>&lt;?php 
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use App\Http\Requests\LoginRequest;
class LoginController extends BaseController
{
    public function postLogin(LoginRequest $request) {
        return [
            'status' =&gt; true,
            'message' =&gt; 'Successfully logged in!'
        ];
    }
}
?&gt;</code></pre><p>Next is <strong>LoginRequest.php</strong> located at <strong>app\Http\Requests</strong> and use the code below.</p><pre class="wp-block-code"><code>&lt;?php 
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Contracts\Hashing\Hasher;
use Illuminate\Validation\Factory as ValidationFactory;
class LoginRequest extends FormRequest
{
  protected function failedValidation(Validator $validator) { 
    throw new HttpResponseException(
      response()-&gt;json([
        'status' =&gt; false,
        'messages' =&gt; $validator-&gt;errors()-&gt;all()
      ], 401)
    ); 
  }
  public function authorize()
  {
      return true;
  }
  public function rules()
  {
      return [
          'username' =&gt; 'required',
          'password' =&gt; 'required'
      ];
  }
}
?&gt;</code></pre><p>The last part is add it to our route located at <strong>routes/web.php</strong> for new version of laravel <strong>app/Http/routes.php</strong> for older version.</p><pre class="wp-block-code"><code>Route::post('login', 'LoginController@postLogin');
</code></pre><p>And if you encounter an error while testing the login probably it's the csrf middleware laravel that causing it, just disable it by updating the file <strong>app/Http/Kernel.php&nbsp;</strong>by removing the code below.</p><pre class="wp-block-code"><code>\App\Http\Middleware\VerifyCsrfToken::class,
</code></pre><p>Here's the example result of what I did in postman by sending to the url without the username and password.</p><figure class="wp-block-image size-full"><img src="http://wp.test/wp-content/uploads/2022/06/image-1.png" alt="" class="wp-image-179 fr-fic fr-dii"></figure><p>Happy coding!</p>]]></content:encoded>
            <pubDate>Mon, 28 Jan 2019 18:17:37 GMT</pubDate>
        </item>
    </channel>
</rss>
