This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Filament\Facades\Filament; | |
use Illuminate\Foundation\Vite; | |
use Illuminate\Support\ServiceProvider; | |
class FilamentServiceProvider extends ServiceProvider | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inspired by https://gist.github.com/rjnienaber/af47fccb8410926ba7ea35f96c3b87fd | |
# remove bundled ImageMagick | |
sudo apt remove imagemagick -y | |
# install base dependencies | |
sudo apt-get install -y \ | |
build-essential \ | |
git \ | |
libde265-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#app/models/event.rb | |
class Event < ActiveRecord::Base | |
translates :title, :description | |
has_many :event_translations | |
accepts_nested_attributes_for :event_translations, :allow_destroy => true | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# db/migrate/20111218135715_globalize_models.rb | |
class GlobalizeModels < ActiveRecord::Migration | |
def up | |
NewsItem.create_translation_table!( | |
{:title => :string, :body => :text}, | |
{:migrate_data => true} | |
) | |
end |