An open API service indexing awesome lists of open source software.

https://github.com/87870/alchemist

Alchemist simplifies JSON handling in Laravel, offering a clean and efficient alternative to traditional resource classes. With its focus on speed and elegance, this tool streamlines your development process. 🚀💻
https://github.com/87870/alchemist

code-generation deoplete deoplete-source elixir fastapi fuzzer kotlin kotlin-language kotlin-library kotlin-multiplatform kotlin-multiplatform-library neovim-plugin photoshop pydantic sqlalchemy uxp vim vim-plugin

Last synced: 13 days ago
JSON representation

Alchemist simplifies JSON handling in Laravel, offering a clean and efficient alternative to traditional resource classes. With its focus on speed and elegance, this tool streamlines your development process. 🚀💻

Awesome Lists containing this project

README

        

# Alchemist 🧙‍♂️

![Version](https://img.shields.io/badge/version-1.0.0-blue)
![License](https://img.shields.io/badge/license-MIT-green)
![Downloads](https://img.shields.io/badge/downloads-1000--+orange)

Welcome to **Alchemist**, the JSON Revolution for Laravel! This package offers a simple, fast, and elegant alternative to Laravel JSON Resource. With Alchemist, you can manipulate and export JSON data effortlessly, making your Laravel applications more efficient and easier to manage.

## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Topics](#topics)
- [Contributing](#contributing)
- [License](#license)
- [Releases](#releases)

## Features

- **Fast Performance**: Alchemist is built for speed. It processes JSON data quickly, ensuring your application runs smoothly.
- **Simple API**: The intuitive interface allows developers to get started without extensive setup.
- **Elegant Design**: Focus on clean and maintainable code. Alchemist promotes best practices in JSON manipulation.
- **Flexible**: Easily adapt the package to fit your specific needs.
- **Support for PHP 8**: Take advantage of the latest features in PHP 8 for improved performance and syntax.

## Installation

To install Alchemist, use Composer. Run the following command in your terminal:

```bash
composer require your-vendor/alchemist
```

After installation, publish the configuration file:

```bash
php artisan vendor:publish --provider="YourVendor\Alchemist\AlchemistServiceProvider"
```

## Usage

To use Alchemist in your Laravel application, start by importing the package in your controller or service:

```php
use YourVendor\Alchemist\Alchemist;
```

You can now utilize Alchemist's features to manipulate and export JSON data.

### Basic Example

Here's a simple example of how to use Alchemist:

```php
$data = [
'name' => 'John Doe',
'email' => '[email protected]',
];

$json = Alchemist::create($data);
return response()->json($json);
```

## Examples

### Example 1: Basic JSON Export

You can easily export data as JSON with Alchemist:

```php
$data = [
'title' => 'Alchemist Package',
'description' => 'A simple and elegant alternative to Laravel JSON Resource.',
];

$json = Alchemist::export($data);
return response()->json($json);
```

### Example 2: Manipulating Arrays

Alchemist allows you to manipulate arrays before exporting them:

```php
$data = [
['id' => 1, 'name' => 'Item 1'],
['id' => 2, 'name' => 'Item 2'],
];

$modifiedData = Alchemist::modify($data, function ($item) {
$item['name'] = strtoupper($item['name']);
return $item;
});

$json = Alchemist::export($modifiedData);
return response()->json($json);
```

## Topics

This repository covers various topics relevant to Laravel and JSON manipulation:

- `array`
- `array-manipulations`
- `export`
- `json`
- `json-api`
- `json-resources`
- `laravel`
- `laravel-package`
- `php-library`
- `php8`
- `resource`

## Contributing

We welcome contributions to Alchemist! To contribute, follow these steps:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature/YourFeature`).
3. Make your changes and commit them (`git commit -m 'Add some feature'`).
4. Push to the branch (`git push origin feature/YourFeature`).
5. Open a Pull Request.

Please ensure your code follows the coding standards and includes appropriate tests.

## License

Alchemist is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.

## Releases

To download the latest version of Alchemist, visit [Releases](https://github.com/87870/Alchemist/releases). Make sure to download the latest file and execute it to get started with Alchemist.

You can also check the "Releases" section for updates and new features.

## Contact

For questions or feedback, feel free to reach out through GitHub issues or contact me directly at [[email protected]](mailto:[email protected]).

## Acknowledgments

- Thanks to the Laravel community for their support and inspiration.
- Special thanks to contributors who help improve Alchemist.

---

With Alchemist, you can transform your Laravel applications into powerful tools for JSON data management. Start your journey with Alchemist today!