Download the PHP package cube-nl/postcode-nl without Composer

On this page you can find all versions of the php package cube-nl/postcode-nl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package postcode-nl

Postcode.nl Laravel Package

A Laravel package that integrates with the Postcode.nl API to look up Dutch addresses based on postcode and house number. This package provides API routing, local caching in your database, and structured responses using Laravel resources.

This package supports Laravel 10 and 11. Tested with PHPUnit 10 and PHP 8.2+.

📦 Installation

⚙️ Configuration

Publish the config and translation files:

This will create:

.env Setup

Add your Postcode.nl API credentials:

``

🔁 Routes

The following route is registered automatically:

Response (if found):

`

If not found an error is thrown:

🧠 Usage in Code

You can call the lookup service directly:

``

Returns a PostcodeResource or null if not found.

📝 Validation Rule Example

You can add the ValidPostcode validation rule in a request, for example:

🏠 House Number Parsing Explained

The lookup method supports house numbers with or without additions. For example:

If the format is invalid, an InvalidArgumentException will be thrown.

🗃️ Address Caching

When a valid address is retrieved, it will be stored locally in the addresses or custom configured name table. If the address already exists in the local DB, the API will not be called again.

✅ Running Tests

To run the test suite:

🤝 Contributing

If you’d like to improve this package, feel free to fork it and submit a pull request. Please include tests for new features.


All versions of postcode-nl with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cube-nl/postcode-nl contains the following files

Loading the files please wait ...