PHPackages                             samuelayo/contactform - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. samuelayo/contactform

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

samuelayo/contactform
=====================

A contact form package for laravel

5338PHP

Since Aug 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/samuelayo/contact-form-package)[ Packagist](https://packagist.org/packages/samuelayo/contactform)[ RSS](/packages/samuelayo-contactform/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

How to create and publish a Laravel package on packagist
========================================================

[](#how-to-create-and-publish-a-laravel-package-on-packagist)

A Laravel package is a set of reusable classes created to add extra functionality to a Laravel website. In clearer terms, a package is to Laravel, what plugins are to WordPress. The primary goal of Laravel packages is to reduce development time by making reusable features into a set of standalone classes that can be used within any Laravel project.

[View tutorial](https://pusher.com/tutorials/publish-laravel-packagist)

Getting Started
---------------

[](#getting-started)

- Create a fresh laravel package

```
composer create-project --prefer-dist laravel/laravel packagetestapp

```

- change directory to the new folder

```
cd packagetestapp

```

- When it's done you need to configure your env file and set your app key and other necessary details. In your terminal type:

```
cp .env.example .env

```

- generate the app key

```
php artisan key:generate

```

- create a folder called `packages`, then create a new folder called samuelayo.

> Note that you can subtitute samuelayo with your own vendor name. Be sure to change the refrence in every other aspect of the app

- clone this repository to the newly created folder

```
git clone https://github.com/samuelayo/contact-form-package.git packages/samuelayo/contactform

```

- Tell Laravel how to load our package and use it's functions, so inside the root of your Laravel app in the composer.json add this code:

```

"autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "Samuelayo\\Contactform\\": "packages/samuelayo/contactform/src",
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Samuelayo\\Contactform\\": "packages/samuelayo/contactform/src",
            "Tests\\": "tests/"
        }
    },

```

- Dump the composer autoloader

```
composer dump-autoload

```

- Next, we need to add our new Service Provider in our `config/app.php` inside the `providers` array:

```
'providers' => [
         ...,
            App\Providers\RouteServiceProvider::class,
            // Our new package class
            Samuelayo\Contactform\ContactFormServiceProvider::class,
        ],

```

- Migrate the database tables

```
php artisan migrate

```

And finally, start the application by running:

```
php artisan serve

```

Visit  in your browser to view the demo.

If you want to include the project as a package to your app, run:

```
composer require samuelayo/contactform

```

Built With
----------

[](#built-with)

- [Laravel](https://laravel.com/) - The PHP framework for web artisans.

###  Health Score

23

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a19ffab85db4c52e4c5d6f24187b5bb9d16d1c9979e5d8f838fbfc8fb4fdcdb?d=identicon)[samuelayo](/maintainers/samuelayo)

---

Top Contributors

[![samuelayo](https://avatars.githubusercontent.com/u/14964486?v=4)](https://github.com/samuelayo "samuelayo (10 commits)")

### Embed Badge

![Health badge](/badges/samuelayo-contactform/health.svg)

```
[![Health](https://phpackages.com/badges/samuelayo-contactform/health.svg)](https://phpackages.com/packages/samuelayo-contactform)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
