PHPackages                             aatifbangash/contact - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. aatifbangash/contact

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

aatifbangash/contact
====================

This will send email to admin and save contact query in database

0.0.4(2y ago)016MITPHP

Since Feb 24Pushed 2y agoCompare

[ Source](https://github.com/aatifbangash/laravel-custom-package)[ Packagist](https://packagist.org/packages/aatifbangash/contact)[ RSS](/packages/aatifbangash-contact/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

Laravel package example
=======================

[](#laravel-package-example)

We can create a package that will be having the common files (Models, Controllers, Migrations, Middlewares, etc) and will be included in all the microservices as a composer package.

This will send email to admin and save contact query in database
----------------------------------------------------------------

[](#this-will-send-email-to-admin-and-save-contact-query-in-database)

How to use it in our projects (microservices)
---------------------------------------------

[](#how-to-use-it-in-our-projects-microservices)

Add the following block to your composer.json file
--------------------------------------------------

[](#add-the-following-block-to-your-composerjson-file)

```
"repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/aatifbangash/laravel-custom-package.git" //URL of your github repo
        }
    ],
    "require": {
        "bitfumes/contact": "dev-master" //your vendor/package_name (we can get the name from composer.json file from package) and repo branch with dev- prefix
    }
```

open the terminal and install/update the package. We have to run the following command whenever we make changes in the package source code
------------------------------------------------------------------------------------------------------------------------------------------

[](#open-the-terminal-and-installupdate-the-package-we-have-to-run-the-following-command-whenever-we-make-changes-in-the-package-source-code)

> composer update bitfumes/contact

> composer dump-autoload

open the route from package in browser. You will see the output
---------------------------------------------------------------

[](#open-the-route-from-package-in-browser-you-will-see-the-output)

>

Middleware from custom package
------------------------------

[](#middleware-from-custom-package)

Also, I have written a middleware (MyMiddleware.php) in the package. That we can use with any route.

```
Route::get('/users', function () {
   // logic here...
})->middleware('MyMiddleware'); //You don't need to register the MyMiddleware in the Kernal.php. It will auto-registered by the Laravel
```

For private repo
----------------

[](#for-private-repo)

If your repo is private then either generate token from github and add that token to your composer global config

> composer config --global github-oauth.github.com YOUR\_ACCESS\_TOKEN

Or
--

[](#or)

generate the ssh\_key and add that key to your github account

Upload to packagist
-------------------

[](#upload-to-packagist)

You have to login to packagist.com through the github credentials. And submit your github repo url to packagist. Also make sure to create a release with tag (version 0.0.1) when you push your code to repo

> git tag -a v2.1.0 -m "xyz feature is released in this tag."

> git push --tags

Add to the project
------------------

[](#add-to-the-project)

```
"require": {
        "aatifbangash/contact": "*"
    }
```

Add with \* for the versioning. So every time we run **composer update aatifbangash/contact** after changing the code and pushing to the repo, the package in the project will be updated with the latest code.

Update package to a specific version
------------------------------------

[](#update-package-to-a-specific-version)

Or run the following command **composer require aatifbangash/contact:0.0.3** with the tag number to upgrade the package to the specific version in the project.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 76.5% 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.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

805d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/225d77a24030c809a95f8be964290a643906bb40113ea0f11e18d6b169efa0dd?d=identicon)[aatifbangash](/maintainers/aatifbangash)

---

Top Contributors

[![aatifbangash](https://avatars.githubusercontent.com/u/35859555?v=4)](https://github.com/aatifbangash "aatifbangash (13 commits)")[![sarthaksavvy](https://avatars.githubusercontent.com/u/41295276?v=4)](https://github.com/sarthaksavvy "sarthaksavvy (4 commits)")

### Embed Badge

![Health badge](/badges/aatifbangash-contact/health.svg)

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M228](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M52](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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