PHPackages                             erdaldemirci/larasquarev - 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. [API Development](/categories/api)
4. /
5. erdaldemirci/larasquarev

ActiveLibrary[API Development](/categories/api)

erdaldemirci/larasquarev
========================

Simple and extensible Foursquare API PHP Client with Laravel Support based on Guzzle 6

0.1.5(4y ago)056MITPHPPHP &gt;=7.4.0

Since May 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/erdaldemirci/larasquarev)[ Packagist](https://packagist.org/packages/erdaldemirci/larasquarev)[ Docs](https://github.com/erdaldemirci/larasquarev)[ RSS](/packages/erdaldemirci-larasquarev/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

Larasquarev
===========

[](#larasquarev)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ab2f4065c367730f817771be8a66f9dcfddf3aeeeef04bbc17b3a5309d275f02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f657264616c64656d697263692f6c6172617371756172652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/erdaldemirci/larasquarev)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](license.md)[![Total Downloads](https://camo.githubusercontent.com/a97468d8fa11906e928b679c6e07a4506e891f30ab90b97a1ced533d75b6f1e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f657264616c64656d697263692f6c6172617371756172652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/erdaldemirci/larasquarev)

Simple and extensible Foursquare API PHP Client with Laravel Facade and ServiceProvider based on Guzzle 7 Currently it supports only userless endpoint requests.

Install
-------

[](#install)

Via Composer

```
$ composer require erdaldemirci/larasquarev
```

Usage with Laravel
------------------

[](#usage-with-laravel)

To use the Laravel Facade you need to add the ServiceProvider and Facade classes in your `config\app.php`

```
'providers' => [
    ...
    Erdaldemirci\Larasquarev\Provider\LarasquareServiceProvider::class,
];

'aliases' => [
    ...
    'Larasquarev' => Erdaldemirci\Larasquarev\Facade\Larasquare::class
];
```

You need to add your Foursquare client ID and secret in `config\services.php`

```
'foursquare' => [
    'clientId'.    => YOUR_FOURSQUARE_CLIENT_ID,
    'clientSecret' => YOUR_FOURSQUARE_CLIENT_SECRET
    'version'      => 20200101, //example
    'intent'       => 'global', //global or null
]
```

After this you can directly use the Laravel Facade

```
$venues = Larasquare::venues($searchQuery);
```

Standard Usage
--------------

[](#standard-usage)

```
$config = [
    clientId = YOUR_FOURSQUARE_CLIENT_ID,
    clientSecretT = YOUR_FOURSQUARE_CLIENT_SECRET,
    apiUrl = FOURSQUARE_API_URL, //optional
    version = SUPPORTED_VERSION, //optional, format: YYYYMMDD
];

$foursquare = new Foursquare($config);

$venues = $foursquare->venues($searchQuery);
```

Query filters
-------------

[](#query-filters)

If you need to generate, filter or transform your search query you can extract all the logic in a separate class that implements the `Erdaldemirci\Larasquarev\Filter\FilterContract`and then just inject it with `setFilter()` method.

```
$venues = Larasquare::setFilter(new MyFilter())->venues();
```

Put your filter logic in the parse() method. It will automatically receive the query passed in the search methods. You can overwrite values, generate values from your custom array or whatever you need. The returned array will be sent with the Foursquare request.

```
/**
* Generate, transform or filter your search query
*
* @param $query
* @return array
*/
public function parse($query = [])
{
    return [
        'll' => $query['location']['lat'] . ',' . $query['location']['lon'],
        'query' => $query['searchTerm'],
        'near' => $_GET['nearLocation'],
        'radius' => 200
    ];
}
```

Methods
-------

[](#methods)

\*\* Endpoints not covered by this library \*\* You can use the `request` method to query a Foursquare endpoint.

```
// get venue photos
$response = Larasquare::request("venues/$venueId/photos")

// get details about a tip,
$response = Larasquare::request("tips/$tipId")
```

\*\* Searching Venues \*\*

```
//Laravel
$venues = Larasquare::venues($query);
```

\*\* Get a single venue \*\*

```
$venues = Larasquare::venue($venueId);
```

\*\* Other venues methods \*\*

```
// get suggestion @see https://developer.foursquare.com/docs/venues/suggestcompletion
$venues = Larasquare::suggest($searchQuery);

// get trending @see https://developer.foursquare.com/docs/venues/trending
$venues = Larasquare::trending($searchQuery);
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](license.md) for more information.

Forked :

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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 ~15 days

Total

5

Last Release

1799d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/129a82285d3610ca63cbf78678b3672db30693c680d9620fb655ac4a8d4e6b7d?d=identicon)[erdaldemirci](/maintainers/erdaldemirci)

---

Top Contributors

[![erdaldemirci](https://avatars.githubusercontent.com/u/4181225?v=4)](https://github.com/erdaldemirci "erdaldemirci (7 commits)")

---

Tags

apiclientlaravelfoursquare

### Embed Badge

![Health badge](/badges/erdaldemirci-larasquarev/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k9.5M87](/packages/openai-php-laravel)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[resend/resend-php

Resend PHP library.

617.2M42](/packages/resend-resend-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74331.3k1](/packages/mozex-anthropic-laravel)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.8k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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