Download the PHP package soysaltan/marygen without Composer

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

MaryGen Documentation

Table of Contents

  1. Introduction
  2. Features
  3. Requirements
  4. Installation
  5. Configuration
  6. Usage
  7. Command Structure
  8. Generated Components
  9. Customization
  10. Translation Feature
  11. Troubleshooting
  12. Contributing
  13. License
  14. Support

Introduction

MaryGen is a powerful Laravel package designed to streamline the process of generating MaryUI components and Livewire pages for your Laravel models. It automates the creation of CRUD (Create, Read, Update, Delete) interfaces, saving developers significant time and effort in setting up admin panels or data management systems.

Features

Requirements

Installation

  1. Ensure you have a Laravel project set up.

  2. Install the MaryUI:

    https://mary-ui.com/docs/installation

  3. Install the Livewire, Livewire Volt packages (if not already installed with MaryUI):

  4. Install the MaryGen package:

  5. (Optional) Publish the configuration file:

Configuration

After publishing the configuration file, you can modify config/marygen.php to customize the package behavior:

Usage

To generate a MaryUI component and Livewire page for a model, use the following command:

Example:

This command will generate a Livewire page for the User model with CRUD functionality, name the view file admin-users.blade.php, and translate the content from English to Spanish and skip the automatic route generation.

Prevent Automatic Route Generation (as of v0.35.2)

Starting from version 0.35.2, MaryGen prevents automatic route generation feature. By default, when you generate a new component without using --no-route option with the marygen:make command, a corresponding route is automatically added to your routes/web.php file.

Customization

You can customize the generated components by modifying the following methods in the MaryGenCommand class:

Additionally, you can edit the generated files directly to further tailor them to your specific needs.

Translation Feature

MaryGen includes a translation feature that allows you to generate content in different languages. This feature uses the Google Translate API to translate field names, labels, and other text elements in the generated components. It uses stichoza/google-translate-php package. (https://github.com/Stichoza/google-translate-php) To use the translation feature:

  1. Specify the destination language using the --dest_lang option when running the marygen:make command.
  2. Optionally, specify the source language using the --source_lang option. If not provided, Google Translate will attempt to auto-detect the source language.

Example:

This command will generate the components for the Product model and translate the content from English to French.

Note: The translation feature requires an active internet connection to communicate with the Google Translate API.

Troubleshooting

Common issues and their solutions:

  1. MaryUI package not found:

    • Error: MaryUI package not found! Please install using: 'composer req robsontenorio/mary'
    • Solution: Run composer require robsontenorio/mary to install the MaryUI package.
  2. Livewire Volt package not found:

    • Error: Livewire Volt package not found! Please see doc: 'https://livewire.laravel.com/docs/volt#installation'
    • Solution: Install Livewire Volt using composer require livewire/livewire livewire/volt && php artisan volt:install.
  3. Model not found:

    • Error: Model {modelName} does not exist!
    • Solution: Ensure the specified model exists in your model namespace (default: App\Models).
  4. View file already exists:

    • Error: File {viewName}.blade.php already exists!
    • Solution: Choose a different name for your view or manually delete the existing file if you want to overwrite it.
  5. Translation errors:

    • Error: Various Google Translate API errors
    • Solution: Ensure you have an active internet connection and that the language codes you're using are valid. Check the Google Translate documentation for supported language codes.
  6. Route generation issues:
    • Problem: Unwanted routes being added to routes/web.php
    • Solution: Use the --no-route option when running the marygen:make command to prevent automatic route generation.

Contributing

Contributions to MaryGen are welcome! Here's how you can contribute:

  1. Fork the repository
  2. Create a new branch for your feature or bug fix
  3. Write your code and tests
  4. Submit a pull request with a clear description of your changes

Please ensure your code adheres to the existing style conventions and includes appropriate tests.

License

MaryGen is open-source software licensed under the MIT license.

Support

For more information or support:


For the latest updates and more detailed information about MaryUI, please visit the official MaryUI documentation.


All versions of marygen with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^10.0|^11.0
stichoza/google-translate-php Version ^5.2
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 soysaltan/marygen contains the following files

Loading the files please wait ....