Tighten linter for Laravel conventions.

Overview

TLint Logo


Latest Version on Packagist

Install (Requires PHP 7.3+)

composer global require tightenco/tlint

Upgrade

composer global update tightenco/tlint

What Is It?

This is an opinionated code linter (with growing support for auto-formatting!) for Tighten flavored code conventions for Laravel and PHP.

For example, Laravel has many available ways to pass variables from a controller to a view:

A)

$value = 'Hello, World!';

return view('view', compact('value'));

B)

return view('view', ['value' => 'Hello, World!']);

C)

return view('view')
    ->with('value', 'Hello, World!');

In this case TLint will warn if you are not using the B) method. This example is a sort of "meta layer" of code linting, allowing teams to avoid higher level sticking points of code review / discussions.

TLint also has more immediately useful lints that can supplement your editor/IDE such as:

  • NoUnusedImports
  • TrailingCommasOnArrays
  • And many more! (See below for full listing)

Usage

For entire project (you must pass the lint command to use other options)

tlint

For individual files and specific directories

tlint lint index.php
tlint lint app

You can also lint only diff files by running the following with unstaged git changes

tlint lint --diff
tlint lint src --diff

Want the output from a file as JSON? (Primarily used for integration with editor plugins)

tlint lint test.php --json

Want to only run a single linter?

tlint --only=UseConfigOverEnv

Example Output

Linting TestLaravelApp/routes/web.php
============
Lints:
============
! Prefer `view(...)->with(...)` over `view(..., [...])`.
5 : `    return view('test', ['test' => 'test']);``

Beta Support: Formatting

Using the same conventions as above, but using the format command, you can auto-fix some lints:

tlint format

Linting Configuration

TLint Ships with 2 "preset" styles: Laravel & Tighten. The Laravel preset is intended to match the conventions agreed upon by the Laravel framework contributors, while the Tighten preset is intended to match those agreed upon by Tighten team members.

The default configuration is "tighten" flavored, but you may change this by adding a tlint.json file to your project's root directory with the following schema:

You may further customize the linters used by adding specific lint names to the "disabled" list (As shown below). You may disable linting for specific directories by adding them to the "excluded" list (As shown below).

{
    "preset": "laravel",
    "disabled": ["NoInlineVarDocs"],
    "excluded": ["tests/"]
}

Custom Configuration & Presets

You can also add your own custom preset and linters by providing a fully-qualified class name as the preset. For example, if you created a custom preset class:

namespace App\Support\Linting;

/** use ... */

class Preset implements PresetInterface
{
  public function getLinters() : array
  {
    return [
      PrefixTestsWithTest::class,
      ModelMethodOrder::class,
    ];
  }

  public function getFormatters() : array
  {
  	return [];
  }
}

Then your config could look like:

{
    "preset": "App\\Support\\Linting\\Preset"
}

This lets you define whatever custom linting functionality, or modify the existing linters to your liking.

Formatting Configuration (Beta)

Similar to linting there are two "preset" styles for formatting: Laravel & Tighten.

The default configuration is "tighten", but you may change this by adding a tformat.json file to your project's root directory with the following schema:

{
    "preset": "laravel"
}

Editor Integrations

PHPStorm

Sublime

VSCode

Available Linters

General PHP

  • No leading slashes in namespaces or static calls or instantiations. RemoveLeadingSlashNamespaces
  • Fully qualified class name only when it's being used a string (class name). QualifiedNamesOnlyForClassName
  • Class "things" should follow the ordering presented in the handbook. ClassThingsOrder
  • Sort imports alphabetically AlphabeticalImports
  • Trailing commas on arrays TrailingCommasOnArrays
  • No parenthesis on empty instantiations NoParensEmptyInstantiations
  • Space after sole not operator SpaceAfterSoleNotOperator
  • One blank line between class constants / properties of different visibility OneLineBetweenClassVisibilityChanges
  • Never use string interpolation without braces NoStringInterpolationWithoutBraces
  • Spaces around concat operators, and start additional lines with concat ConcatenationSpacing
  • File should end with a new line NewLineAtEndOfFile
  • No /*_ @var ClassName $var _/ inline docs NoInlineVarDocs (https://github.com/tighten/tlint/issues/108)
  • There should be no unused imports NoUnusedImports

PHPUnit

Laravel

  • Use with over array parameters in view(). ViewWithOverArrayParameters
  • Prefer view(..., [...]) over view(...)->with(...). ArrayParametersOverViewWith
  • Don’t use environment variables directly in code; instead, use them in config files and call config vars from code. UseConfigOverEnv
  • There should only be rest methods in an otherwise purely restful controller. PureRestControllers
  • Controller method order (rest methods follow docs). RestControllersMethodOrder
  • Use the simplest request(...) wherever possible. RequestHelperFunctionWherePossible
  • Use auth() helper over the Auth facade. UseAuthHelperOverFacade
  • Remove method docblocks in migrations. NoDocBlocksForMigrationUpDown
  • Import facades (don't use aliases). ImportFacades
  • Mailable values (from and subject etc) should be set in build(). MailableMethodsInBuild
  • No leading slashes on route paths. NoLeadingSlashesOnRoutePaths
  • Apply middleware in routes (not controllers). ApplyMiddlewareInRoutes
  • Model method order (relationships > scopes > accessors > mutators > boot). ModelMethodOrder
  • There should be no calls to dd(), dump(), ray(), or var_dump(). NoDump
  • Use request()->validate(...) helper function or extract a FormRequest instead of using $this->validate(...) in controllers RequestValidation
  • Blade directive spacing conventions. NoSpaceAfterBladeDirectives, SpaceAfterBladeDirectives
  • Spaces around blade rendered content SpacesAroundBladeRenderContent
  • Use blade {{ $model }} auto escaping for models, and double quotes via json_encode over @json blade directive: -> OR NoJsonDirective

Available Formatters (Beta Support)

Notes about formatting

  • Formatting is designed to alter the least amount of code possible.
  • Import related formatters are not designed to alter grouped imports.

General PHP

  • Alphabetizes import statements AlphabeticalImports
  • Removes unused import statements UnusedImports
  • Removes excess newlines around use statements ExcessSpaceBetweenAndAfterImports

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments
  • String concat spacing standard for laravel

    String concat spacing standard for laravel

    @mattstauffer I am currently using the https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 file for Laravel Shift with php fixer. Everything formats correctly except for

    'concat_space' => [
            'spacing' => 'none'
        ],
    

    I see in tlint you all use 1 space. I know tlint is an opinionated linter, but I am just curious if there is a consensus on the concat spacing in the Laravel community?

    Thanks, Kevin

    opened by delta1186 7
  • Tlint command not found.

    Tlint command not found.

    Hi,

    I am new to laravel, So I apologise for the silly question.

    I have installed this package both globally and locally, When I try and run tlint in my terminal I get -bash: tlint: command not found

    Would you be able to advise in where I am going wrong.

    Thanks,

    opened by Gazzza20 7
  • Add support for Group Use Declarations to ImportFacades linter

    Add support for Group Use Declarations to ImportFacades linter

    I want to use this project on my code, but one issue I noticed is that the linter ImportFacades didn't have support for grouped use declarations (see the test for an example). To address this, I updated the linter to support this PHP 7 import syntax.

    A new test has been added to verify this works (the diff might look a little odd since it's mostly copy-paste).

    opened by EricTendian 7
  • Allow app-specific presets and linters/formatters

    Allow app-specific presets and linters/formatters

    We're looking into using tlint but have slightly different linting needs. Originally I was just going to fork the project, but it was fairly simple to add custom preset support via a moderate refactor. Before I spend much more time cleaning things up add adding tests, I wanted to get feedback on if this is something you're willing to merge in.

    Changes of note:

    • Rather than using the getRoutesFilesLinters/etc methods, I've added a static method called appliesToPath to all Linters. This way, the linter can determine if it applies, and the command logic is simplified down to an array_filter call. Traits are provided, like LintsRoutesFiles, so that common filtering can be re-used (all the existing filters are re-implemented as traits).

    • Because custom presets need to be able to publish custom linters or formatters, I've inverted the logic around filtering. The preset + config become responsible for defining the linters that should be applied, and then the command just filters those that are enabled by whether they apply to a given file.

    • The extension parameter was only being used in one linter (UseAuthHelperOverFacade) to determine if the code needed to be compiled from blade. I refactored things so that the whole filename is provided to the linter, and updated UseAuthHelperOverFacade to compile the code if necessary. This simplified a number of the other changes.

    • I had to update logic in a number of places that assumed all classes were in the Tighten namespace. As a result, it probably makes sense to just switch to fully qualified class names instead. I'm happy to do that but want to keep the diff of this as minimal as possible at first.

    • Right now a lot of things are marked as private which makes extending them for our own use difficult. A good example is that our code standards keep the boot method at the top of the file. Ideally, we'd just extend ModelMethodOrder and update the METHOD_ORDER constant and use that in our custom preset. The private keyword prevents that. How do you feel about me swapping out the private keyword where protected would make more sense to allow for extension?

    An example of an custom config file would just be:

    {
      "preset": "App\\Support\\Linting\\AppPreset",
      "disabled": [
        "App\\Support\\Linting\\Linters\\MyCustomLinter",
        "AlphabeticalImports"
      ],
      "excluded": [
        "tests/"
      ]
    }
    

    You can still use the "laravel" or "tighten" preset and that will work, and if you don't provide a full class name it will automatically normalize it to Tighten\Linters or Tighten\Formatters for you.

    opened by inxilpro 7
  • Call to undefined method PhpParser\Node\Expr\Variable::toString()

    Call to undefined method PhpParser\Node\Expr\Variable::toString()

    2.1.5 (27d6789b20d3cfde228393469a239d2d2fe9a1ad) laravel 5.8

    PHP Fatal error: Uncaught Error: Call to undefined method PhpParser\Node\Expr\Variable::toString() in /var/www/html/vendor/tightenco/tlint/src/Linters/NoUnusedImports.php:34 Stack trace: #0 /var/www/html/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php(42): Tighten\Linters\NoUnusedImports->Tighten\Linters\{closure}(Object(PhpParser\Node\Expr\ClassConstFetch)) #1 /var/www/html/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(123): PhpParser\NodeVisitor\FindingVisitor->enterNode(Object(PhpParser\Node\Expr\ClassConstFetch)) #2 /var/www/html/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(223): PhpParser\NodeTraverser->traverseNode(Object(PhpParser\Node\Arg)) #3 /var/www/html/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(114): PhpParser\NodeTraverser->traverseArray(Array) #4 /var/www/html/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(146): PhpParser\NodeTraverser->traverseNode(Object(PhpParser\Node\Expr\MethodCall)) #5 /var/www/html/vendor/nikic/php-parser/lib/PhpParser/NodeT in /var/www/html/vendor/tightenco/tlint/src/Linters/NoUnusedImports.php on line 34

    opened by opiy-org 7
  • search for Model fixtures / real world examples

    search for Model fixtures / real world examples

    Hey all,

    possibly you've seen that I'm working on the ModelMethodOrder linter and to improve its stability I would like to add several more fixtures to test with. So I'm asking everyone able/willing to add some examples, in best case the most complex, unconventional and/or strange ones. You can anonymize them if you don't want/can publish your real code - but it would be great if at least the return statements, visibility and return type-hints stay the same as these are what we use to detect the method types and order them.

    What makes your model special?

    • extending another base-class
    • having several private, protected methods in it
    • having abstract methods as it's your base-model
    • having static methods - possibly with different visibility
    • returning non-variables - hardcoded values or function or static method calls
    • and definitely more ...

    How to submit your model? If you want to add one/some you can copy the code here and use the github codeblock styling

    ```php
    // add your model code here
    ```
    

    or you upload your files as an attachment - but GitHub only accepts TXT or ZIP files, so change the extension or zip them before upload.


    Thanks in advance to everyone willing to share some code. 🙏 🎉

    discussion 
    opened by Gummibeer 6
  • tlint always returns an error when using `--json`

    tlint always returns an error when using `--json`

    Hi,

    As part of a review on an issue for the VSCode integration I have noticed a change in behaviour of the --json flag since v3.0.9.

    src/Commands/LintCommand.php now always returns self::LINTS_FOUND_OR_ERROR regardless of whether there are errors. In the extension if the return code of the tlint command is not 0 then the output isn't processed as it is assumed the command failed.

    I can change the behaviour of the extension to ignore the error but since the json format is mostly useful for IDE integration I would suggest it be better to return self::NO_LINTS_FOUND_OR_SUCCESS and allow the consumer to parse the JSON object that is always returned to identify whether there are any linting errors.

    Is there any reason for the change in behaviour that I am missing? Otherwise happy to add a PR to change the return value.

    opened by d9705996 6
  • `AlphabeticalImports` reports imported functions at the end as not alphabetically sorted

    `AlphabeticalImports` reports imported functions at the end as not alphabetically sorted

    use Closure;
    use Illuminate\Http\Request;
    use Sentry\State\Scope;
    use function Sentry\configureScope;
    

    This is reported by the AlphabeticalImports rule - I assume that it's because of the imported function at the end!? Is this intended? So should the function be imported between the classes to be alphabetical?

    opened by Gummibeer 5
  • Customizable paths in config

    Customizable paths in config

    Hey! We use TLint in multiple projects and love it! Great job! 👏

    In some of our apps we have a different app structure. We might have "Modules" both the root directory or within the app directory. These "Modules" contains controllers and other logic.

    We're unable to lint these files due to how the path is being set. E.g. LintsControllers, https://github.com/tighten/tlint/blob/main/src/Linters/Concerns/LintsControllers.php

    How could TLint allow a preset or config to customize paths that override traits? Is this even of interest to add to the package? We would be happy to make a PR, but how would you like it solved? Or should we simply fork it and roll our own solution?

    opened by ecrmnn 5
  • Bug: Formatting ignores disabled

    Bug: Formatting ignores disabled "NoDocBlocksForMigrationUpDown" rule

    Using tlint format all the comments inside migrations will be removed, despite the rule is present in the config file:

    {
        "preset": "laravel",
        "disabled": [
            "NoDocBlocksForMigrationUpDown"
        ]
    }
    
    opened by emyasnikov 5
  • Doc block triggering OneLineBetweenClassVisibilityChanges lint

    Doc block triggering OneLineBetweenClassVisibilityChanges lint

    In the process of cleaning up an existing project, I ran into an issue with the OneLineBetweenClassVisibilityChanges linter where it does not appear to play nicely with doc blocks. If I remove the doc block the linter is not triggered.

    And don't worry I know my properties are in the wrong order. :)

    I can make an attempt to fix this issue if you would like.

    Also, I am going to submit a secondary PR to add the AlphabeticalImports linter to the Laravel preset.

    image

    image

    opened by delta1186 5
  • Look into bundling as PHAR

    Look into bundling as PHAR

    I'm wondering if bundling TLint as a PHAR would reduce our testing overhead around symfony:

     symfony:
      [
        [4, "^4.4.30", "^4.4.20"],
        [5, "^5.3.7", "^5.0.9"],
        [6, "^6.0", "^6.0"],
      ]
    

    Would this allow us to use symfony components without worrying about the included version in the project TLint is being used on?

    Not sure how this change would affect the IDE plugins.

    opened by driftingly 1
  • New linter to enforce controllers declare return type

    New linter to enforce controllers declare return type

    A new linter that enforces all public methods of controllers to declare a return type which is a child of the Symfony base response or implements the Laravel Responsable interface. This linter help to enforce return types at all and also the right ones in controllers.

    opened by Gummibeer 0
Releases(v8.0.1)
  • v8.0.1(Jan 6, 2023)

    What's Changed

    • Fix "use auth helper" logic by @driftingly in https://github.com/tighten/tlint/pull/328

    Full Changelog: https://github.com/tighten/tlint/compare/v8.0.0...v8.0.1

    Source code(tar.gz)
    Source code(zip)
  • v8.0.0(Jan 6, 2023)

    What's Changed

    • Add code methods to BaseFormatter by @driftingly in https://github.com/tighten/tlint/pull/302
    • Add replaceCodeLine to BaseFormatter by @driftingly in https://github.com/tighten/tlint/pull/305
    • Add Ray by @driftingly in https://github.com/tighten/tlint/pull/306
    • Add Vite facade by @driftingly in https://github.com/tighten/tlint/pull/307
    • Change config property visibility to public by @driftingly in https://github.com/tighten/tlint/pull/321
    • Code clean-up using Duster by @driftingly in https://github.com/tighten/tlint/pull/322
    • Add SpaceAfterBladeDirectives formatter by @driftingly in https://github.com/tighten/tlint/pull/301
    • Add SpacesAroundBladeRenderContent formatter by @driftingly in https://github.com/tighten/tlint/pull/303
    • Add NoLeadingSlashesOnRoutePaths formatter by @driftingly in https://github.com/tighten/tlint/pull/309
    • Clean up git blame with .git-blame-ignore-revs by @driftingly in https://github.com/tighten/tlint/pull/323
    • Add RequestValidation formatter by @driftingly in https://github.com/tighten/tlint/pull/320
    • Add ArrayParametersOverViewWith formatter by @driftingly in https://github.com/tighten/tlint/pull/317
    • Add MailableMethodsInBuild formatter by @driftingly in https://github.com/tighten/tlint/pull/313
    • Add RemoveLeadingSlashNamespaces formatter by @driftingly in https://github.com/tighten/tlint/pull/311
    • Add NoSpaceAfterBladeDirectives formatter by @driftingly in https://github.com/tighten/tlint/pull/308
    • Add UseAuthHelperOverFacade formatter by @driftingly in https://github.com/tighten/tlint/pull/304
    • Add OneLineBetweenClassVisibilityChanges formatter by @driftingly in https://github.com/tighten/tlint/pull/318
    • Add RequestHelperFunctionWherePossible formatter by @driftingly in https://github.com/tighten/tlint/pull/319
    • 8.0 Release by @driftingly in https://github.com/tighten/tlint/pull/326

    Full Changelog: https://github.com/tighten/tlint/compare/v7.0.1...v8.0.0

    Source code(tar.gz)
    Source code(zip)
  • v7.0.1(Nov 4, 2022)

    What's Changed

    • Remove excess space formatter by @driftingly in https://github.com/tighten/tlint/pull/298
    • Update changelog for 7.0.1 by @driftingly in https://github.com/tighten/tlint/pull/299

    Full Changelog: https://github.com/tighten/tlint/compare/v7.0.0...v7.0.1

    Source code(tar.gz)
    Source code(zip)
  • v7.0.0(Nov 2, 2022)

    What's Changed

    • [7.x] Add FullyQualifiedFacades to Tighten and Laravel presets by @bakerkretzmar in https://github.com/tighten/tlint/pull/265
    • [7.x] Move shared visitor setup into base Linter by @bakerkretzmar in https://github.com/tighten/tlint/pull/281
    • [7.x] Remove redundant linters and formatters by @driftingly in https://github.com/tighten/tlint/pull/284
    • [7.x] Drop support for PHP 7.3 & 7.4 by @driftingly in https://github.com/tighten/tlint/pull/289
    • [7.x] Update Laravel fixture by @driftingly in https://github.com/tighten/tlint/pull/296
    • [7.x] Update readme by @driftingly in https://github.com/tighten/tlint/pull/295
    • 7.x by @driftingly in https://github.com/tighten/tlint/pull/297

    Full Changelog: https://github.com/tighten/tlint/compare/v6.3.0...v7.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
Tighten
Tighten
This package gives you a set of conventions to make the most out of Hotwire in Laravel

Introduction This package gives you a set of conventions to make the most out of Hotwire in Laravel (inspired by the turbo-rails gem). There is a comp

Tony Messias 665 Jan 2, 2023
List of 77 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.

Laravel Lang In this repository, you can find the lang files for the Laravel Framework 4/5/6/7/8, Laravel Jetstream , Laravel Fortify, Laravel Cashier

Laravel Lang 6.9k Jan 2, 2023
⚡ Laravel Charts — Build charts using laravel. The laravel adapter for Chartisan.

What is laravel charts? Charts is a Laravel library used to create Charts using Chartisan. Chartisan does already have a PHP adapter. However, this li

Erik C. Forés 31 Dec 18, 2022
Laravel Kickstart is a Laravel starter configuration that helps you build Laravel websites faster.

Laravel Kickstart What is Laravel Kickstart? Laravel Kickstart is a Laravel starter configuration that helps you build Laravel websites faster. It com

Sam Rapaport 46 Oct 1, 2022
Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

null 9 Dec 14, 2022
Laravel Segment is an opinionated, approach to integrating Segment into your Laravel application.

Laravel Segment Laravel Segment is an opinionated, approach to integrating Segment into your Laravel application. Installation You can install the pac

Octohook 13 May 16, 2022
Laravel Sanctum support for Laravel Lighthouse

Lighthouse Sanctum Add Laravel Sanctum support to Lighthouse Requirements Installation Usage Login Logout Register Email Verification Forgot Password

Daniël de Wit 43 Dec 21, 2022
Bring Laravel 8's cursor pagination to Laravel 6, 7

Laravel Cursor Paginate for laravel 6,7 Installation You can install the package via composer: composer require vanthao03596/laravel-cursor-paginate U

Pham Thao 9 Nov 10, 2022
A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

Ollie Codes 19 Jul 5, 2021
A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic

A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic! concepts like , Hijri Dates & Arabic strings and so on ..

Adnane Kadri 49 Jun 22, 2022
Jetstrap is a lightweight laravel 8 package that focuses on the VIEW side of Jetstream / Breeze package installed in your Laravel application

A Laravel 8 package to easily switch TailwindCSS resources generated by Laravel Jetstream and Breeze to Bootstrap 4.

null 686 Dec 28, 2022
Laravel Jetstream is a beautifully designed application scaffolding for Laravel.

Laravel Jetstream is a beautifully designed application scaffolding for Laravel. Jetstream provides the perfect starting point for your next Laravel application and includes login, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum, and optional team management.

The Laravel Framework 3.5k Jan 8, 2023
Laravel Larex lets you translate your whole Laravel application from a single CSV file.

Laravel Larex Translate Laravel Apps from a CSV File Laravel Larex lets you translate your whole Laravel application from a single CSV file. You can i

Luca Patera 68 Dec 12, 2022
A Laravel package that adds a simple image functionality to any Laravel model

Laraimage A Laravel package that adds a simple image functionality to any Laravel model Introduction Laraimage served four use cases when using images

Hussein Feras 52 Jul 17, 2022
A Laravel extension for using a laravel application on a multi domain setting

Laravel Multi Domain An extension for using Laravel in a multi domain setting Description This package allows a single Laravel installation to work wi

null 658 Jan 6, 2023
Example of using abrouter/abrouter-laravel-bridge in Laravel

ABRouter Laravel Example It's a example of using (ABRouter Laravel Client)[https://github.com/abrouter/abrouter-laravel-bridge] Set up locally First o

ABRouter 1 Oct 14, 2021
Laravel router extension to easily use Laravel's paginator without the query string

?? THIS PACKAGE HAS BEEN ABANDONED ?? We don't use this package anymore in our own projects and cannot justify the time needed to maintain it anymore.

Spatie 307 Sep 23, 2022
Laravel application project as Sheina Online Store backend to be built with Laravel and VueJS

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Boas Aditya Christian 1 Jan 11, 2022
Postgis extensions for laravel. Aims to make it easy to work with geometries from laravel models.

Laravel Wrapper for PostgreSQL's Geo-Extension Postgis Features Work with geometry classes instead of arrays. $model->myPoint = new Point(1,2); //lat

Max 340 Jan 6, 2023