Download the PHP package codewithren/contactform without Composer

On this page you can find all versions of the php package codewithren/contactform. 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 contactform

Laravel Livewire Contact Form Package

A simple, reusable contact form package for Laravel using Livewire v3. Perfect for quickly adding a styled contact form to your Laravel projects.

๐Ÿ“ฌ Laravel Livewire Contact Form

๐Ÿš€ Features

๐Ÿงฉ Plug-and-play Livewire component

๐ŸŽจ Beautiful Tailwind CSS design

๐Ÿ“ง Email sending support

๐Ÿ”’ Validation and CSRF protection

โšก Uses Laravel component structure (no config needed)

๐Ÿ“ฆ Installation

composer require codewithren/contactform:dev-main --with-all-dependencies

๐Ÿง  Requirements

PHP 8.2+

Laravel 10/11/12

Livewire 3+

Sweetalert2

Install Sweetalert through composer and run our installer.

composer require wavey/sweetalert && php artisan sweetalert:install

Include the Sweetalert2 javascript and then include our sweetalert 2 layout component.

<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
@include('sweetalert::sweetalert')

Include the scripts in your layout

<script>
    window.addEventListener('alert', (event) => {
        var data = event.detail;
        console.log(data);
        Swal.fire({
            title: "Success",
            text: data.message,
            icon: "success",
            toast: true,
            position: "top-end",
            showCloseButton: true,
            showConfirmButton: false,
            timer: 3000,
            timerProgressBar: true,
            customClass: {
                popup: 'rounded-xl shadow-md text-sm bg-white',
                title: 'font-semibold text-gray-800',
                closeButton: 'text-gray-500 hover:text-red-500',
            },
            didOpen: (toast) => {
                toast.addEventListener('mouseenter', Swal.stopTimer)
                toast.addEventListener('mouseleave', Swal.resumeTimer)
            }
        });
    });
    window.addEventListener('alert-error', (event) => {
        var data = event.detail;
        console.log(data);
        Swal.fire({
            title: "Error",
            text: data.message,
            icon: "error",
            toast: true,
            position: "top-end",
            showCloseButton: true,
            showConfirmButton: false,
            timer: 3000,
            timerProgressBar: true,
            customClass: {
                popup: 'rounded-xl shadow-md text-sm bg-white',
                title: 'font-semibold text-gray-800',
                closeButton: 'text-gray-500 hover:text-red-500',
            },
            didOpen: (toast) => {
                toast.addEventListener('mouseenter', Swal.stopTimer)
                toast.addEventListener('mouseleave', Swal.resumeTimer)
            }
        });
    });
</script>

To enable email notifications, configure your Mailable in the package or override the email logic using events or extending the component. ๐Ÿงพ Publish Config required

php artisan vendor:publish --tag=contactform-config

In .env file add ADMIN_EMAIL and make sure to configure your stmp

ADMIN_EMAIL="[email protected]"

๐Ÿ›  Usage

Include the Livewire component in your Blade file:

<livewire:contact-form />

๐Ÿ—ƒ๏ธ Migrations

The package automatically loads its own migrations.

To run them:

php artisan migrate
php artisan queue:work

That's it! ๐ŸŽ‰ The form includes fields for name, email, and message. ๐Ÿ“จ Email Support

To publish the resources views and livewire component file (optional).

php artisan vendor:publish --tag=contactform-views
php artisan vendor:publish --tag=contactform-livewire

The views will be published to:

resources/views/vendor/contactform/

โœ… Validation Rules

The component validates the following:

name: required, string

email: required, valid email

message: required, min:10

You can customize these by publishing and editing the component. ๐Ÿงช Example Form Output

๐Ÿ™‹โ€โ™‚๏ธ Maintainer

Renish Siwakoti GitHub: @Renish437 ๐Ÿ“„ License

This package is open-sourced under the MIT license.


All versions of contactform with dependencies

PHP Build Version
Package Version
Requires livewire/livewire Version ^3.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 codewithren/contactform contains the following files

Loading the files please wait ...