PHPackages                             czim/aalberts-pxlcms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. czim/aalberts-pxlcms

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

czim/aalberts-pxlcms
====================

Laravel adapter for the Aalberts PXL CMS

0.9.13(9y ago)1276MITPHPPHP &gt;=5.4.0

Since May 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/czim/aalberts-pxlcms)[ Packagist](https://packagist.org/packages/czim/aalberts-pxlcms)[ Docs](https://github.com/czim/aalberts-pxlcms)[ RSS](/packages/czim-aalberts-pxlcms/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (11)Versions (14)Used By (0)

Aalberts Laravel PXL CMS Adapter
================================

[](#aalberts-laravel-pxl-cms-adapter)

Nothing to see here for now. See the PXLCMS adapter package for more information.

Install
-------

[](#install)

Via Composer

```
$ composer require czim/aalberts-pxlcms
```

Add this line of code to the providers array located in your `config/app.php` file:

```
    Aalberts\AalbertsCmsServiceProvider::class,
```

And add the facade aliases to the same file:

```
    'Aalberts'  => Aalberts\Facades\AalbertsFacade::class,
    'Translate' => Aalberts\Facades\TranslateFacade::class,
```

Publish the configuration:

```
$ php artisan vendor:publish
```

Set up event listening for missing translation phrases. Add the following pair to your `EventServiceProvider` class:

```
    \Aalberts\Events\DetectedMissingTranslationPhrase::class => [
        \Aalberts\Listeners\MissingTranslationPhraseListener::class
    ],
    \Aalberts\Events\SearchPerformed::class => [
        \Aalberts\Listeners\SearchListener::class
    ],
```

Cache
-----

[](#cache)

This package requires that a cache driver be used that supports tagging (such as Redis).

Configuration
-------------

[](#configuration)

### .env

[](#env)

Set the following keys for your application in the `.env` file like so (or adjust `confing/aalberts.php` directly).

```
AALBERTS_ORGANIZATION=2
AALBERTS_ORGANIZATION_KEY=VSH
```

### Scheduling

[](#scheduling)

Translations, CMS content and Compano content are all cached for common lookups. All translations should be loaded in cache at all times; other content may be cached on demand.

A typical schedule for this in your `Console/Kernel.php` is:

```
        $schedule->command('aalberts:cache:translations')->everyFiveMinutes();
        $schedule->command('aalberts:cache:cms:check')->everyTenMinutes();
        $schedule->command('aalberts:cache:cmp:check')->dailyAt('06:00');

```

### Translations

[](#translations)

#### Labels

[](#labels)

It is much more efficient to keep all translations cached, to prevent lookups for individual `atrans()` calls. Translations are not automatically cached, at least not in a batch.

To make sure the cache stays up to date, schedule the `artisan:cache:translations` command to run periodically. It is recommended to keep the interval at least 5 minutes or to prevent overlap. The command will check whether a cache is required by comparing the latest `modifiedts` date for all the organization's translations. If no updates since the last cache time are detected, the cache will not be renewed.

If no cache has been set at all, this command will always fill the cache.

#### Local translations

[](#local-translations)

Add `aalberts` translations files for all locales that your application uses and set content like the following:

```
