Download the PHP package amol/laravel-jsonsafe without Composer

On this page you can find all versions of the php package amol/laravel-jsonsafe. 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 laravel-jsonsafe

laravel-jsonsafe


[![Latest Version on Packagist](https://img.shields.io/packagist/v/amol/laravel-jsonsafe.svg?style=flat-square)](https://packagist.org/packages/amol/laravel-jsonsafe) [![run-tests](https://github.com/AmolKumarGupta/laravel-jsonsafe/actions/workflows/run-tests-push.yml/badge.svg)](https://github.com/AmolKumarGupta/laravel-jsonsafe/actions/workflows/run-tests-push.yml) Mutable JSON column casting for Laravel Eloquent. Supports JSON Schema validation via `opis/json-schema`. ## Installation You can install the package via composer: ## Usage ### Basic casting Cast a JSON column to `JsonSafe` in your model: Read and write nested keys directly — changes persist on `save()`: ### JSON Schema validation Define a public `schemaOf{Key}()` method on your model to enable validation. The column key is converted to StudlyCase and prefixed with `schemaOf` (e.g., `preferences` → `schemaOfPreferences()`). If the data violates the schema, an `Exception` is thrown before the database write: Key mapping rules: - `preferences` → `schemaOfPreferences()` - `my_column` → `schemaOfMyColumn()` - `UPPERCASE` → `schemaOfUppercase()` Columns without a schema method are not validated. Schemas follow the [JSON Schema](https://opis.io/json-schema/2.x/structure.html) standard via `opis/json-schema`. You can use any supported keywords (`type`, `properties`, `enum`, `required`, `minimum`, `maximum`, `pattern`, etc.). ### Serialization `toArray()` and `toJson()` return the underlying plain array: ## Testing ## Changelog Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Contributing Please see [CONTRIBUTING](CONTRIBUTING.md) for details. ## Security Vulnerabilities Please review [our security policy](../../security/policy) on how to report security vulnerabilities. ## License The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

All versions of laravel-jsonsafe with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^11.0||^12.0||^13.0
opis/json-schema Version ^2.6
spatie/laravel-package-tools Version ^1.16
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 amol/laravel-jsonsafe contains the following files

Loading the files please wait ...