Download the PHP package ligoo/zammad-laravel without Composer

On this page you can find all versions of the php package ligoo/zammad-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zammad-laravel

Zammad Laravel

A Laravel package for integrating contact forms with the Zammad ticketing system.

Features

Requirements

Installation

Configuration

Publish the configuration file:

Add the following to your .env file:

Getting a Zammad API Token

  1. Log into Zammad as admin
  2. Go to Admin → API → Personal Access Tokens
  3. Create a new token with permissions:
    • ticket.agent (to create/update tickets)
    • admin (recommended for full API access)

Setting Up the API User

The user who owns the API token must have group access to create tickets:

  1. Go to Admin → Manage → Users
  2. Find the user who created the API token
  3. Edit the user and go to Group permissions
  4. Add your target group with full access
  5. Save

Important: Token permissions alone are not enough. The user must also have explicit group access in their user profile.

Finding Your Group ID

  1. Go to Admin → Manage → Groups
  2. Click on the group you want to use
  3. The ID is in the URL: /manage/groups/38 → ID is 38

Testing Your Configuration

After setup, verify everything works:

This command tests:

If any test fails, the output will explain what's wrong.

Usage

Blade (Default)

The package automatically registers routes at /contact. Visit /contact to see the form.

Include in your own layout:

Add the stylesheet to your layout's <head>:

Publish assets:

React

Publish the React component:

This copies ZammadContactForm.tsx to resources/js/vendor/zammad/react/.

Step 1: Disable the package's GET route (so you can use your own Inertia page):

Step 2: Create your Inertia route and controller:

Step 3: Ensure your layout has the CSRF meta tag (required for form submission):

Note: Inertia.js apps typically include this by default. Check your app.blade.php.

Use in your React component:

React Props

Prop Type Required Description
config ContactFormConfig Yes Form configuration from ContactController::getFormConfig()
submitUrl string No Submit URL (default: /contact)
url string No Optional URL to attach to the ticket
onSuccess function No Callback on successful submission
onError function No Callback on validation errors
className string No Additional CSS classes

Vue.js

Publish the Vue component:

This copies ZammadContactForm.vue to resources/js/vendor/zammad/vue/.

Follow the same setup as React (disable GET route, create your Inertia route).

Use in your Vue component:

Vue Props

Prop Type Required Description
config ContactFormConfig Yes Form configuration from ContactController::getFormConfig()
submitUrl string No Submit URL (default: /contact)
url string No Optional URL to attach to the ticket
className string No Additional CSS classes

Vue Events

Event Payload Description
success { message } Emitted on successful submission
error { [field]: string[] } Emitted on validation errors

Route Configuration

Routes use generic names to keep your backend technology hidden:

Customize in your .env:

Inertia / SPA Setup

For Inertia, React, or Vue.js apps, disable only the GET route so you can define your own page while keeping the package's POST handler:

Then in your routes file:

Manual Route Registration

To fully control all routes, disable auto-routes:

Register manually:

Configuration Options

CAPTCHA Drivers

Driver Description
none Disabled (default)
recaptcha_v3 Google reCAPTCHA v3 (invisible, score-based)
turnstile Cloudflare Turnstile (privacy-focused)

Spam Protection

The package includes 8 layers of spam protection:

  1. Rate Limiting (Middleware) - 5 attempts per 60 seconds
  2. Rate Limiting (Cache) - 2 minute cooldown after submission
  3. CAPTCHA - Configurable provider
  4. Honeypot Field - Hidden field that must remain empty
  5. Form Timer - Minimum 3 seconds before submission
  6. Spam Keywords - Blocks messages with blacklisted words
  7. URL Count - Blocks messages with too many URLs
  8. Confirmation Checkbox - User must confirm

Customizing Subject Options

Edit config/zammad.php:

CSS Customization

The CSS uses CSS variables for easy theming. Override in your own stylesheet:

Available variables:

Variable Default Description
--zammad-primary #2563eb Primary button/accent color
--zammad-primary-hover #1d4ed8 Hover state
--zammad-error #dc2626 Error messages
--zammad-success #16a34a Success messages
--zammad-text #1f2937 Text color
--zammad-border #e5e7eb Border color
--zammad-radius 0.375rem Border radius

Localization

The package includes translations for 13 languages:

Code Language
en English
fr French
de German
it Italian
es Spanish
pt Portuguese
nl Dutch
no Norwegian
sv Swedish
da Danish
fi Finnish
hu Hungarian
pl Polish

The package automatically uses Laravel's current locale (app()->getLocale()).

Customizing Translations

Publish the translation files to customize:

This copies files to lang/vendor/zammad/. Edit the files in your preferred language.

Adding New Languages

Create a new file at lang/vendor/zammad/{locale}/zammad.php following the structure of the English file.

Publishing Assets

Facades

Zammad Facade

Captcha Facade

Troubleshooting

403 Forbidden when creating tickets

Symptom: php artisan zammad:test passes connectivity tests but fails on ticket creation with 403.

Cause: The API user doesn't have access to the configured group.

Fix:

  1. Run php artisan zammad:test to see which groups the user has access to
  2. Go to Admin → Manage → Users in Zammad
  3. Edit the API user and add the target group with full access

422 Unprocessable Entity

Symptom: Ticket creation fails with 422 error.

Cause: Invalid data being sent (wrong group ID, invalid customer, etc.)

Fix:

  1. Verify ZAMMAD_DEFAULT_GROUP is a valid group ID
  2. Run php artisan zammad:test to see available groups

419 Page Expired (CSRF token mismatch)

Symptom: React/Vue form submission fails with 419 error.

Cause: Missing CSRF meta tag in your layout.

Fix: Add to your layout's <head>:

Translations showing as keys

Symptom: Form shows zammad::zammad.contact.title instead of actual text.

Cause: Translation files not loaded or published incorrectly.

Fix:

Testing

Disclaimer

This package is an independent, community-developed project. It is NOT affiliated with, endorsed by, or officially connected to Zammad GmbH, Laravel LLC, Google LLC, Cloudflare Inc., or any of their products.

No Warranty: The authors are not liable for any loss of messages, data, communications, security vulnerabilities, or any other issues that may occur through the use of this software. Users are responsible for:

See LICENSE for full terms.

License

MIT License. See LICENSE for details.


All versions of zammad-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ligoo/zammad-laravel contains the following files

Loading the files please wait ...