All Projects → Astrotomic → Laravel Translatable

Astrotomic / Laravel Translatable

Licence: mit
A Laravel package for multilingual models

Programming Languages

language
365 projects

Projects that are alternatives of or similar to Laravel Translatable

Laravelpackage.com
Documentation for LaravelPackage.com: Learn to create Laravel specific PHP packages from scratch, following this open documentation.
Stars: ✭ 214 (-65.71%)
Mutual labels:  hacktoberfest, laravel, package
Laravel Ban
Laravel Ban simplify blocking and banning Eloquent models.
Stars: ✭ 572 (-8.33%)
Mutual labels:  eloquent, laravel, package
Quicksand
Easily schedule regular cleanup of old soft-deleted Eloquent data.
Stars: ✭ 259 (-58.49%)
Mutual labels:  hacktoberfest, eloquent, laravel
Laravel Cascade Soft Deletes
Cascading deletes for Eloquent models that implement soft deletes
Stars: ✭ 498 (-20.19%)
Mutual labels:  eloquent, laravel, package
Comments
Native comments for your Laravel application.
Stars: ✭ 390 (-37.5%)
Mutual labels:  hacktoberfest, laravel, package
Nebula
Nebula is a minimalistic and easy to use administration tool for Laravel applications, made with Laravel, Alpine.js, and Tailwind CSS.
Stars: ✭ 190 (-69.55%)
Mutual labels:  hacktoberfest, laravel, package
Laravel Mediable
Laravel-Mediable is a package for easily uploading and attaching media files to models with Laravel 5.
Stars: ✭ 541 (-13.3%)
Mutual labels:  hacktoberfest, eloquent, laravel
Laravel Package Maker
Get a 📦 skeleton and all other `make` commands from laravel base for package development.
Stars: ✭ 89 (-85.74%)
Mutual labels:  hacktoberfest, laravel, package
Befriended
Eloquent Befriended brings social media-like features like following, blocking and filtering content based on following or blocked models.
Stars: ✭ 596 (-4.49%)
Mutual labels:  eloquent, laravel, package
Plans
Laravel Plans is a package for SaaS apps that need management over plans, features, subscriptions, events for plans or limited, countable features.
Stars: ✭ 326 (-47.76%)
Mutual labels:  eloquent, laravel, package
Laravel Messenger
Simple user messaging package for Laravel
Stars: ✭ 2,140 (+242.95%)
Mutual labels:  hacktoberfest, laravel, package
Lada Cache
A Redis based, fully automated and scalable database cache layer for Laravel
Stars: ✭ 424 (-32.05%)
Mutual labels:  eloquent, database, laravel
Lara Lens
Laravel package for display diagnostic (config, database, http connections...)
Stars: ✭ 96 (-84.62%)
Mutual labels:  hacktoberfest, database, laravel
Laravel Eloquent Query Cache
Adding cache on your Laravel Eloquent queries' results is now a breeze.
Stars: ✭ 529 (-15.22%)
Mutual labels:  eloquent, database, laravel
Laravel Totem
Manage Your Laravel Schedule From A Web Dashboard
Stars: ✭ 1,299 (+108.17%)
Mutual labels:  hacktoberfest, laravel, package
Laravel Translator
An Eloquent translator for Laravel
Stars: ✭ 275 (-55.93%)
Mutual labels:  eloquent, laravel, multilingual
Laravel Packager
A cli tool for creating Laravel packages
Stars: ✭ 1,049 (+68.11%)
Mutual labels:  hacktoberfest, laravel, package
Laravel Schedulable
Schedule and unschedule eloquent models elegantly without cron jobs
Stars: ✭ 78 (-87.5%)
Mutual labels:  hacktoberfest, eloquent, laravel
Corcel
Use WordPress backend with Laravel or any PHP application
Stars: ✭ 3,504 (+461.54%)
Mutual labels:  hacktoberfest, eloquent, laravel
Laravel Acl
This package helps you to associate users with permissions and permission groups with laravel framework
Stars: ✭ 404 (-35.26%)
Mutual labels:  hacktoberfest, laravel, package

Introduction

Latest Version MIT License Offset Earth Larabelles

GitHub Workflow Status StyleCI Codecov Coverage Total Downloads GitBook

laravel-translatable socialcard

If you want to store translations of your models into the database, this package is for you.

This is a Laravel package for translatable models. Its goal is to remove the complexity in retrieving and storing multilingual model instances. With this package you write less code, as the translations are being fetched/saved when you fetch/save your instance.

The full documentation can be found at GitBook.

Installation

composer require astrotomic/laravel-translatable

Quick Example

Getting translated attributes

$post = Post::first();
echo $post->translate('en')->title; // My first post

App::setLocale('en');
echo $post->title; // My first post

App::setLocale('de');
echo $post->title; // Mein erster Post

Saving translated attributes

$post = Post::first();
echo $post->translate('en')->title; // My first post

$post->translate('en')->title = 'My cool post';
$post->save();

$post = Post::first();
echo $post->translate('en')->title; // My cool post

Filling multiple translations

$data = [
  'author' => 'Gummibeer',
  'en' => ['title' => 'My first post'],
  'fr' => ['title' => 'Mon premier post'],
];
$post = Post::create($data);

echo $post->translate('fr')->title; // Mon premier post

Tutorials

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details. You could also be interested in CODE OF CONDUCT.

Security

If you discover any security related issues, please check SECURITY for steps to report it.

Credits

Versions

Package Laravel PHP
v11.6 - v11.9 5.8.* / 6.* / 7.* / 8.* >=7.2
v11.4 - v11.5 5.6.* / 5.7.* / 5.8.* / 6.* >=7.1.3
v11.0 - v11.3 5.6.* / 5.7.* / 5.8.* >=7.1.3

Treeware

You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees at offset.earth/treeware

Read more about Treeware at treeware.earth

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].