Download the PHP package unusualdope/filament-model-translatable without Composer

On this page you can find all versions of the php package unusualdope/filament-model-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 filament-model-translatable

Filament-Model-Translatable (plugin)

DESCRIPTION

Adds the ability to insert translations in content using a language table. For example you can create a main model that stores the object id and the data that is not translatable, on the lang model you have to define the foreign key for the main object(in this case post_id) and the one for the language that has always to be "language_id". Below an example of model definition in YAML for blueprint package:

INSTALLATION

Simply install using composer

run then

and follow the prompts to publish and run the migrations and create the languages.

don't forget to register the plugin in your panel

MAIN MODEL

In the main model extend the FmtModel:

Define some properties to make the plugin work, see the example with comments:

RESOURCE

In the RESOURCE you have to use the Trait fmtTrait and retrieve the translatable fields with

1 - As first parameter you can pass the current schema and it will give you back the full schema with the translatable fields appended at the end.

2 - the Form object

3 - If you want back only the array containing the schema of the translatable fields (to allow you to place it in the middle of your schema) set this to false (default is true) Below is just an example:

CREATE AND EDIT RESOURCE PAGES

On the CREATE page extend

instead of the standard Filament\Resources\Pages\CreateRecord

On the EDIT page extend

instead of the standard Filament\Resources\Pages\EditRecord

e.g.:

RESULT

You will get a tab that let you change language and fill the content for every language:

Fmt Preview Image

ISSUES OR SUGGESTIONS

Please feel free to give any suggestions for improvements or report any issue directly on the github plugin repository


All versions of filament-model-translatable with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
daftspunk/laravel-config-writer Version *
guzzlehttp/guzzle Version ^7.2
filament/filament Version ^3.1
laravel/framework Version ^10.10
jeffgreco13/filament-breezy Version ^2.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 unusualdope/filament-model-translatable contains the following files

Loading the files please wait ....