Download the PHP package said/laravel-translatable without Composer

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

A Trait to handle Translations in Laravel

This is a Laravel package containing a trait for translatable Eloquent models. This package follows the approach to have only a single table to maintain all the translations.

This approach may not be perfect for every use case as the table can grow really big. But compared to all the other packages this approach is the most flexible as it lets you make models and its attributes translatable without extra configuration.

Alternatives to this package are following packages:

  1. Spatie/laravel-translatable saves the translatable attributes as jsons
  2. dimsav/laravel-translatable expects a new table for every new model that has translatable attributes

Requirements

This package require a minimum Laravel version of 5.8 and PHP in version 7.1

Installation

You can install the package via composer:

Now you can use this Trait on any Eloquent Model of your project.

Usage

To make your Eloquent Model translatable just add the Said\Translatable\Traits\TranslatableTrait to your model. Then add a public attribute$translatable_columns` as an array containing all the attributes that should be translatable.

Saving the translations in Controller

Methods

The simplest version of getting an translation is to simply get the property. This will return the value of the property in the current language

You can also use

Getting the translated model

soon

Translating an Model

You can translate a model using ... soon Changelog

Check CHANGELOG for the changelog

Testing

soon

Contributing

soon

Security

soon

About Said Ibrahim

soon.

License

The MIT License (MIT).


All versions of laravel-translatable with dependencies

PHP Build Version
Package Version
No informations.
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 said/laravel-translatable contains the following files

Loading the files please wait ....