Getting Started
The Sync package can either be added to an existing Nexus application like the Alberon Intranet, or you can create a standalone application like the turn IT on Sync app.
Give the application access to the package using the PHP Packages application, then install it using Composer:
scripts/composer.sh require alberon/nexus-sync
If you are syncing other MySQL databases, the Laravel Multiple Databases package will probably be useful as well.
Publish the config file:
scripts/artisan.sh vendor:publish --tag=nexus-sync-config
Add this to App\Console\Kernel::schedule():
// Run sync jobs at least once a day in case any triggers are missed
// Run at 12:30am not midnight to avoid off-by-one errors when comparing dates
// (and not 1am or 2am to avoid daylight savings time complications)
$schedule->command('sync:all', ['--trigger' => 'cron job'])->dailyAt('0:30')->onOneServer();
// Mark old jobs as timed out
$schedule->command('sync:timeout')->daily()->onOneServer();
Add this to LayoutSidebar.vue:
import LayoutSidebarLinkSync from '@alberon/nexus-sync/vue/LayoutSidebarLinkSync';
// ...
<LayoutSidebarLinkSync />
(I recommend adding this to "Administration" if it's an existing application, or the top level otherwise.)
Then grant permissions to the relevant users (see Alberon\NexusSync\Enums\Permission if you want to do this in a seeder, e.g. RoleSeeder).