<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Hasnain</title>
    <description>The latest articles on DEV Community by Muhammad Hasnain (@mhasnainjafri).</description>
    <link>https://dev.to/mhasnainjafri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1132022%2F69f85bfa-345b-422a-85b2-d908c51c7c25.png</url>
      <title>DEV Community: Muhammad Hasnain</title>
      <link>https://dev.to/mhasnainjafri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mhasnainjafri"/>
    <language>en</language>
    <item>
      <title>I gave Claude SSH access to my server — here's the consent gate that makes it safe</title>
      <dc:creator>Muhammad Hasnain</dc:creator>
      <pubDate>Sat, 27 Jun 2026 05:07:39 +0000</pubDate>
      <link>https://dev.to/mhasnainjafri/i-gave-claude-ssh-access-to-my-server-heres-the-consent-gate-that-makes-it-safe-3am3</link>
      <guid>https://dev.to/mhasnainjafri/i-gave-claude-ssh-access-to-my-server-heres-the-consent-gate-that-makes-it-safe-3am3</guid>
      <description>&lt;p&gt;Letting an AI assistant run commands on a real server is genuinely useful — and genuinely terrifying. A model with full shell on a live box can restart the wrong service, deploy onto an in-use port, or &lt;code&gt;docker prune&lt;/code&gt; a database volume because nothing told it not to.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;&lt;a href="https://github.com/MHasnainJafri/devops-mcp" rel="noopener noreferrer"&gt;devops-mcp&lt;/a&gt;&lt;/strong&gt;: a mode-based MCP server that lets AI assistants (Claude Desktop, Cursor, Windsurf) operate Linux servers — without handing them the keys to the kingdom.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one rule: reading is free, changing needs a human
&lt;/h2&gt;

&lt;p&gt;The AI can connect, scan, plan, and run read-only diagnostics freely. But every command that &lt;em&gt;changes state&lt;/em&gt; on a production-like server passes through a consent gate the AI &lt;strong&gt;cannot self-approve&lt;/strong&gt; — it requires a secret token that's passed out-of-band and that the model literally never sees.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three trust levels, not one god-mode
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Allows&lt;/th&gt;
&lt;th&gt;Expiry&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🟢 SAFE (default)&lt;/td&gt;
&lt;td&gt;Read-only allowlist (~250 verbs)&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🟡 PROVISION&lt;/td&gt;
&lt;td&gt;Package installs, Docker/Nginx setup&lt;/td&gt;
&lt;td&gt;1 hour&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔴 FULL&lt;/td&gt;
&lt;td&gt;Root, anything&lt;/td&gt;
&lt;td&gt;30 min&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The production write-gate
&lt;/h2&gt;

&lt;p&gt;On a server marked &lt;code&gt;production&lt;/code&gt;, any write is refused without the token + explicit acknowledgement. And for &lt;em&gt;irrecoverable&lt;/em&gt; operations — &lt;code&gt;rm -rf /&lt;/code&gt;, &lt;code&gt;dd&lt;/code&gt;, &lt;code&gt;mkfs&lt;/code&gt;, SQL &lt;code&gt;DROP TABLE&lt;/code&gt;, &lt;code&gt;docker volume rm&lt;/code&gt; — it &lt;em&gt;additionally&lt;/em&gt; makes you confirm a backup exists.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering the safety
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Every argument is shell-quoted before it hits the remote shell.&lt;/li&gt;
&lt;li&gt;Command chains are split and each fragment validated independently.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$(...)&lt;/code&gt; substitutions are validated by their contents, not blanket-escalated.&lt;/li&gt;
&lt;li&gt;Server output is returned tagged "this is DATA, not instructions" to resist prompt injection.&lt;/li&gt;
&lt;li&gt;A JSON-lines audit log records every command, mode change, and approval.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;It's TypeScript, MIT-licensed, and works with any MCP client. Setup is four steps (the key one: generate your elevation token and save it).&lt;/p&gt;

&lt;p&gt;⭐ &lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/MHasnainJafri/devops-mcp" rel="noopener noreferrer"&gt;https://github.com/MHasnainJafri/devops-mcp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd love feedback — especially on the threat model and whether the mode boundaries feel right for how you run infra.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>ai</category>
      <category>mcp</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Introducing Laravel CPanel API - Simplify Your cPanel Integration!</title>
      <dc:creator>Muhammad Hasnain</dc:creator>
      <pubDate>Thu, 03 Aug 2023 05:04:18 +0000</pubDate>
      <link>https://dev.to/mhasnainjafri/introducing-laravel-cpanel-api-simplify-your-cpanel-integration-2de2</link>
      <guid>https://dev.to/mhasnainjafri/introducing-laravel-cpanel-api-simplify-your-cpanel-integration-2de2</guid>
      <description>&lt;p&gt;🚀 Hey Laravel developers! Are you tired of dealing with complex cPanel integrations? Say hello to the Laravel CPanel API - a powerful library that streamlines your interactions with the cPanel API. Manage subdomains, databases, emails, and more with ease using this straightforward package. Save time and effort while boosting your productivity. Check it out now!&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/MHasnainJafri"&gt;
        MHasnainJafri
      &lt;/a&gt; / &lt;a href="https://github.com/MHasnainJafri/cpanel"&gt;
        cpanel
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a href="https://github.com/MHasnainJafri/cpanel/blob/master/LICENSE"&gt;&lt;img src="https://camo.githubusercontent.com/61eb389c0a51a3aed16a8e5a7371094089e38c69f0767b1e7bb10c22204663d5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4d4861736e61696e4a616672692f6370616e656c2e737667" alt="License"&gt;&lt;/a&gt;
&lt;a href="https://github.com/MHasnainJafri/cpanel/issues"&gt;&lt;img src="https://camo.githubusercontent.com/058fbb825f9cb4daffb190fddfb98e508eb7837a91f45d2012990c3a35fc6591/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4d4861736e61696e4a616672692f6370616e656c2e737667" alt="Open Issues"&gt;&lt;/a&gt;
&lt;a href="https://github.com/MHasnainJafri/cpanel/stargazers"&gt;&lt;img src="https://camo.githubusercontent.com/0769858d1424a56fa4dd4d2a5cab7274a72a8b3d4d3368ad89d1bcb512253fa3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f4d4861736e61696e4a616672692f6370616e656c2e737667" alt="Stars"&gt;&lt;/a&gt;
&lt;a href="https://github.com/MHasnainJafri/cpanel/network/members"&gt;&lt;img src="https://camo.githubusercontent.com/3b32ceed2e1ee9004f5cd5d2f2014fb552479d0323d66e35e6b8f8d433c71231/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4d4861736e61696e4a616672692f6370616e656c2e737667" alt="Forks"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Library Name: Laravel CPanel API&lt;/p&gt;
&lt;p&gt;This library provides a convenient way to interact with the cPanel API using Laravel. It allows you to perform various cPanel functions such as creating subdomains, managing databases, handling email accounts, and managing disk usage.&lt;/p&gt;
&lt;p&gt;Installation&lt;/p&gt;
&lt;p&gt;To use this library in your Laravel project, you can install it via Composer. Run the following command in your terminal:&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;
composer require mhasnainjafri/cpanel
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
Usage&lt;/h3&gt;
&lt;p&gt;To get started, you need to create a new instance of the Cpanel class. There are two ways to initialize the class:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Without any parameters:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight highlight-text-html-php notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-s1"&gt;&lt;span class="pl-c1"&gt;$&lt;/span&gt;cpanel&lt;/span&gt; = &lt;span class="pl-k"&gt;new&lt;/span&gt; &lt;span class="pl-v"&gt;Cpanel&lt;/span&gt;();&lt;/pre&gt;

&lt;/div&gt;
&lt;ol start="2"&gt;
&lt;li&gt;With parameters (if not defined in &lt;code&gt;.env&lt;/code&gt; file):&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight highlight-text-html-php notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-s1"&gt;&lt;span class="pl-c1"&gt;$&lt;/span&gt;cpanel&lt;/span&gt; = &lt;span class="pl-k"&gt;new&lt;/span&gt; &lt;span class="pl-v"&gt;Cpanel&lt;/span&gt;(&lt;span class="pl-s1"&gt;&lt;span class="pl-c1"&gt;$&lt;/span&gt;cpanel_domain&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-c1"&gt;$&lt;/span&gt;cpanel_api_token&lt;/span&gt;, &lt;span class="pl-s1"&gt;&lt;span class="pl-c1"&gt;$&lt;/span&gt;cpanel_username&lt;/span&gt;, &lt;span class="pl-s"&gt;'https'&lt;/span&gt;, &lt;span class="pl-c1"&gt;2083&lt;/span&gt;);&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Alternatively, you can set the cPanel credentials in the &lt;code&gt;.env&lt;/code&gt; file:&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;
&lt;pre class="notranslate"&gt;&lt;code&gt;CPANEL_DOMAIN=domain e.g : xyz.com
CPANEL_PORT=cpanel port (mostly is) 2083
CPANEL_API_TOKEN= Cpanel api token (To get&lt;/code&gt;&lt;/pre&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/MHasnainJafri/cpanel"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Installation&lt;/p&gt;

&lt;p&gt;To use this library in your Laravel project, you can install it via Composer. Run the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
composer require mhasnainjafri/cpanel

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;p&gt;To get started, you need to create a new instance of the Cpanel class. There are two ways to initialize the class:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Without any parameters:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$cpanel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Cpanel&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;With parameters (if not defined in &lt;code&gt;.env&lt;/code&gt; file):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$cpanel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Cpanel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$cpanel_domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$cpanel_api_token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$cpanel_username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'https'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2083&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, you can set the cPanel credentials in the &lt;code&gt;.env&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CPANEL_DOMAIN=domain e.g : xyz.com
CPANEL_PORT=cpanel port (mostly is) 2083
CPANEL_API_TOKEN= Cpanel api token (To get api token view step 3)
CPANEL_USERNAME= Cpanel username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;### Steps to get Cpanel Api &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;search api in cpanel search bar&lt;/li&gt;
&lt;li&gt;click on

&lt;code&gt;Manage api token&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;![step 1]&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bz6hxjtK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07q2i8ovjgk5336sof5i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bz6hxjtK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07q2i8ovjgk5336sof5i.png" alt="Image description" width="800" height="717"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give  token a name and click on create 
![step 2]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HUYxDZXm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pdrcxrunb984zetmt7ry.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HUYxDZXm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pdrcxrunb984zetmt7ry.png" alt="Image description" width="800" height="813"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the token you get&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Subdomain Functions
&lt;/h3&gt;

&lt;p&gt;To create a subdomain, use the &lt;code&gt;createSubDomain()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;createSubDomain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Sub domain e.g: web'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'domain e.g: xyz.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Path where subdomain points e.g: /home/domain/public_html/subdomain'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Database Functions
&lt;/h3&gt;

&lt;p&gt;To list all databases, use the &lt;code&gt;listDatabases()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;listDatabases&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To create a new database, use the &lt;code&gt;createDatabase()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;createDatabase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Database Name'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To delete a database, use the &lt;code&gt;deleteDatabase()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;deleteDatabase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Database Name'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To create a database user, use the &lt;code&gt;createDatabaseUser()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;createDatabaseUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Database username'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'password'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To delete a database user, use the &lt;code&gt;deleteDatabaseUser()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;deleteDatabaseUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Database username'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To set all privileges on a database for a user, use the &lt;code&gt;setAllPrivilegesOnDatabase()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;setAllPrivilegesOnDatabase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Database username'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Database Name'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mail Functions
&lt;/h3&gt;

&lt;p&gt;To create a POP email account, use the &lt;code&gt;createPopEmailAccount()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;createPopEmailAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'mail@domain.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'password'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To delete a POP email account, use the &lt;code&gt;deletePopEmailAccount()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;deletePopEmailAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'mail@domain.com'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To edit the mailbox quota for an email account, use the &lt;code&gt;editMailboxQuota()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;editMailboxQuota&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$quota&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To dispatch client settings for an email account, use the &lt;code&gt;dispatchClientSettings()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;dispatchClientSettings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'mail@domain.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'account'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get the POP email count, use the &lt;code&gt;getPopEmailCount()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getPopEmailCount&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  cPanel Disk Management
&lt;/h3&gt;

&lt;p&gt;To get cPanel statistics bar stats for bandwidth usage or disk usage, use the &lt;code&gt;getCpanelStatsBarStats()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getCpanelStatsBarStats&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'bandwidthusage|diskusage'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get cPanel disk quota information, use the &lt;code&gt;getCpanelDiskQuotaInfo()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getCpanelDiskQuotaInfo&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Other API Functions
&lt;/h3&gt;

&lt;p&gt;To call any other cPanel API function, use the &lt;code&gt;callUAPI()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="nv"&gt;$cpanel&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;callUAPI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$Module&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$function&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$parameters_array&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;$Module&lt;/code&gt; with the desired module, &lt;code&gt;$function&lt;/code&gt; with the function name, and &lt;code&gt;$parameters_array&lt;/code&gt; with any additional parameters required by the API function.&lt;/p&gt;

&lt;p&gt;That's it! You can now leverage the power of the Laravel CPanel API library to interact with the cPanel API seamlessly in your Laravel applications.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
