PHPackages                             laravelarab/data-source - 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. [Database &amp; ORM](/categories/database)
4. /
5. laravelarab/data-source

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

laravelarab/data-source
=======================

This Package will provide every data a site owner may need in the future :D

v0.2(9y ago)121[1 issues](https://github.com/LaravelArab/data-source/issues)MITPHP

Since Feb 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/LaravelArab/data-source)[ Packagist](https://packagist.org/packages/laravelarab/data-source)[ RSS](/packages/laravelarab-data-source/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (3)Used By (0)

About Package
-------------

[](#about-package)

This Package will provide every Data a site owner may need in the future :D

Installation
------------

[](#installation)

the only available way to install DataSource right now is **composer** or you can do it manually like the old way by cloning this repo or downloading it .

```
$ composer require laravelarab/data-source
```

Add this line to your `/config/app.php` inside **providers** at the end of array

```
LaravelArab\DataSource\DataSourceServiceProvider::class,
```

And this to **aliases** array in the same file

```
'DataSource'   => LaravelArab\DataSource\Facades\DataSource::class,
```

than you can run

```
$ php artisan vendor:publish --tag=config
```

Instructions
------------

[](#instructions)

***note :*** The only available data for now is Countries and States and Cities .

```
DataSource::countries(); // get all countries
DataSource::states(); // get all states
DataSource::cities(); // get all cities

DataSource::country($id); // get country by id
DataSource::country($id)->states; // get country States
DataSource::country($id)->cities; // get county Cities

DataSource::state($id); // get state by id
DataSource::state($id)->country; // get state Country
DataSource::state($id)->cities; // get state Cities

DataSource::city($id); // get city by id
DataSource::city($id)->country; // get city Country
DataSource::city($id)->state; // get city State

DataSource::countryByCode($code); // get Country by code e.g: MA

DataSource::countryByName($name); // get Country by name e.g: Morocco
DataSource::stateByName($name); // get State by name e.g: Tangier-Tetouan
DataSource::cityByName($name); // get City by name e.g: Titwan

// you can access properties name & id & code for example
DataSource::country($id)->id;
DataSource::country($id)->name;
DataSource::country($id)->code;

DataSource::countryByCode($code)->name;
DataSource::countryByName($name)->code;
// you can also do this with state and cities

DataSource::state($id)->id;
DataSource::state($id)->name;
DataSource::state($id)->country_id;

DataSource::city($id)->id;
DataSource::city($id)->name;
DataSource::city($id)->country_id;
DataSource::city($id)->state_id;
```

License
-------

[](#license)

MIT

**Free Software, Hell Yeah!**

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~10 days

Total

2

Last Release

3400d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9916806?v=4)[AB C.](/maintainers/chadidi)[@chadidi](https://github.com/chadidi)

---

Top Contributors

[![chadidi](https://avatars.githubusercontent.com/u/9916806?v=4)](https://github.com/chadidi "chadidi (24 commits)")

---

Tags

citiescountriesdatadata-structuredatabaselaravel-5-packagestates

### Embed Badge

![Health badge](/badges/laravelarab-data-source/health.svg)

```
[![Health](https://phpackages.com/badges/laravelarab-data-source/health.svg)](https://phpackages.com/packages/laravelarab-data-source)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M117](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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