PHPackages                             lotfixyz/laravel-smartdetect - 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. lotfixyz/laravel-smartdetect

ActiveLibrary

lotfixyz/laravel-smartdetect
============================

Cool development helper for Laravel.

048PHP

Since Jan 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/lotfixyz/laravel-smartdetect)[ Packagist](https://packagist.org/packages/lotfixyz/laravel-smartdetect)[ RSS](/packages/lotfixyz-laravel-smartdetect/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Smartdetect
-------------------

[](#laravel-smartdetect)

***Cool development helper for Laravel.***

*Tested on Laravel 5.8 and 6.2*

### Install

[](#install)

Require this package with composer using the following command:

```
composer require lotfixyz/laravel-smartdetect
```

After composer command done, add autoload to `autoload/psr-4` of your the `composer.json` file and run `composer dump-autoload` certainly.

```
"Lotfixyz\\Smartdetect\\": "vendor/lotfixyz/laravel-smartdetect/src"
```

Something like this:

```
...
"autoload": {
    "psr-4": {
        ...
        "Lotfixyz\\Smartdetect\\": "vendor/lotfixyz/laravel-smartdetect/src"
    },
    ...
},
...

```

Finally add the service provider to the `providers` array in `config/app.php`

```
Lotfixyz\Smartdetect\SmartdetectServiceProvider::class,
```

### Install --dev

[](#install---dev)

To install this package on only development systems, add the `--dev` flag to your composer command:

```
composer require --dev lotfixyz/laravel-smartdetect
```

After composer command done, add autoload to `autoload-dev/psr-4` of your the `composer.json` file and run `composer dump-autoload` certainly.

```
"Lotfixyz\\Smartdetect\\": "vendor/lotfixyz/laravel-smartdetect/src"
```

Something like this:

```
...
"autoload-dev": {
    "psr-4": {
        ...
        "Lotfixyz\\Smartdetect\\": "vendor/lotfixyz/laravel-smartdetect/src"
    },
    ...
},
...

```

Finally, instead of adding the service provider in the `config/app.php` file, you can add the following code to your `app/Providers/AppServiceProvider.php` file, within the `register()` method:

```
if ('production' !== $this->app->environment())
{
    $this->app->register(\Lotfixyz\Smartdetect\SmartdetectServiceProvider::class);
}
```

This will allow your application to load the Smartdetect on non-production enviroments.

### Important Note:

[](#important-note)

Don't forget to run `composer dump-autoload` after any change of your `composer.json` file.

### Publishing

[](#publishing)

You can publish the config file to take the control of your defaults and settings.

Run `php artisan vendor:publish` and select `Lotfixyz\Smartdetect\SmartdetectServiceProvider`

### Environment File

[](#environment-file)

You can also optionally add following lines to your .env file.

```
SMARTDETECT_TURNED_OFF=false
SMARTDETECT_DEBUG_MODE="${APP_DEBUG}"
SMARTDETECT_INVOLVE_CONFIG=true
SMARTDETECT_INVOLVE_DOMAIN=true
SMARTDETECT_INVOLVE_IP=true
SMARTDETECT_INVOLVE_REQUEST=true
SMARTDETECT_INVOLVE_USER=true
```

### Usage

[](#usage)

Simply use this sample.

```
$smartdetect = new SmartdetectClass();
$smartdetect->bind_ip('94.232.175.55');
$smartdetect->bind_domain('lotfi.xyz', SmartdetectClass::DOMAIN_TYPE_ENTIRE);
$smartdetect->bind_domain('.xyz', SmartdetectClass::DOMAIN_TYPE_EXTENSION);
$smartdetect->bind_domain('lotfi.', SmartdetectClass::DOMAIN_TYPE_NAME);
$smartdetect->bind_request('with_value', 110);
$smartdetect->bind_request('without_value');
$smartdetect->bind_user('demo', SmartdetectClass::USER_TYPE_EMAIL);
$smartdetect->bind_user('2', SmartdetectClass::USER_TYPE_ID);
$smartdetect->make();
dd((array)$smartdetect->result);
```

### Note

[](#note)

Documents and New Features are upcoming...

### License

[](#license)

The Laravel Smartdetect is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

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/87b9ae2da36431356f66c98963a6fe52814546ac2f24ee5804bf79059b5d0a24?d=identicon)[lotfixyz](/maintainers/lotfixyz)

---

Top Contributors

[![lotfixyz](https://avatars.githubusercontent.com/u/404715?v=4)](https://github.com/lotfixyz "lotfixyz (1 commits)")

### Embed Badge

![Health badge](/badges/lotfixyz-laravel-smartdetect/health.svg)

```
[![Health](https://phpackages.com/badges/lotfixyz-laravel-smartdetect/health.svg)](https://phpackages.com/packages/lotfixyz-laravel-smartdetect)
```

PHPackages © 2026

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