PHP code example of tomatophp / filament-translations
1. Go to this page and download the library: Download tomatophp/filament-translations library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tomatophp / filament-translations example snippets
use TomatoPHP\FilamentTranslations\Filament\Resources\TranslationResource\Table\TranslationTable;
public function boot()
{
TranslationTable::register([
\Filament\Tables\Columns\TextColumn::make('something')
]);
}
use TomatoPHP\FilamentTranslations\Filament\Resources\TranslationResource\Table\TranslationActions;
public function boot()
{
TranslationActions::register([
\Filament\Tables\Actions\ReplicateAction::make()
]);
}
use TomatoPHP\FilamentTranslations\Filament\Resources\TranslationResource\Table\TranslationFilters;
public function boot()
{
TranslationFilters::register([
\Filament\Tables\Filters\SelectFilter::make('something')
]);
}
use TomatoPHP\FilamentTranslations\Filament\Resources\TranslationResource\Table\TranslationBulkActions;
public function boot()
{
TranslationBulkActions::register([
\Filament\Tables\BulkActions\DeleteAction::make()
]);
}
use TomatoPHP\FilamentTranslations\Filament\Resources\TranslationResource\Form\TranslationForm;
public function boot()
{
TranslationForm::register([
\Filament\Forms\Components\TextInput::make('something')
]);
}
use TomatoPHP\FilamentTranslations\Filament\Resources\TranslationResource\Actions\ManagePageActions;
use TomatoPHP\FilamentTranslations\Filament\Resources\TranslationResource\Actions\EditPageActions;
use TomatoPHP\FilamentTranslations\Filament\Resources\TranslationResource\Actions\ViewPageActions;
use TomatoPHP\FilamentTranslations\Filament\Resources\TranslationResource\Actions\CreatePageActions;
public function boot()
{
ManagePageActions::register([
Filament\Actions\Action::make('action')
]);
EditPageActions::register([
Filament\Actions\Action::make('action')
]);
ViewPageActions::register([
Filament\Actions\Action::make('action')
]);
CreatePageActions::register([
Filament\Actions\Action::make('action')
]);
}