Download the PHP package oxygencms/oxy-nova without Composer
On this page you can find all versions of the php package oxygencms/oxy-nova. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package oxy-nova
Oxygen CMS package for use with Laravel Nova.
Installation
Require "oxygencms/oxy-nova": "@dev"
in your own composer.json
to get the package.
Since this package requires spatie/laravel-medialibrary to deal with uploads and media make sure you have it's migration published and run.
By default file conversions will be queued. It is recommended to set the QUEUE_CONNECTION=redis
in your .env
file.
If you do so also make sure to create the failed_jobs
table. Then just run the queue worker as usual.
Config
Publish the oxygen.php
config file.
Define the 'media' disk for the media library in the config/filesystem.php
file.
Publish the config for the media library it self.
In config/medialibrary.php
set the default disk_name
and optionally the image_driver
Translation Files
Use the translations
tag to publish the language files for each locale in the config. (BG & NL available atm).
Views
The views can be published with the views
tag.
Migrations, Seeds and Factories
To publish the factories for this package you can use the factories
tag:
To publish the migrations for this package you can use the migrations
tag:
To publish the seeders for this package you can use the seeds
tag:
To publish all of the above at once you can use the database
tag:
To include some dummy data for the packages entities add the SEED_TEST_DATA=true
to the
.env
file and seed your database with php artisan migrate:fresh --seed
command.
Console
There is an artisan command for quick setup using the default config.
Tests
To run the tests include a <testsuite>
tag in your project's phpunit.php
file and point it to the tests dir.
Functionality
Phrases
The phrases are neat way to store translations in the database so they can be edited. To utilize them we need to swap
the default TranslationServiceProvider
with the PhraseServiceProvider
in config/app.php
.
The phrase's caching requires cache driver that does support tagging! predis/predis
is already required in the
package's composer file so we also need to configure laravel to use it. Set it in the .env
file.
Then phrases and translations are both accessed with the standard Laravel helpers @lang()
, __()
, trans()
&
trans_choice()
. If a phrase exists in the database with the given group/key it will be returned and cached. If not
the one from the translation files will be returned instead. If both are present the one from DB will take precedence.
Pages
Using pages allows for easier management of the applications content and SEO. If a page has different slug for a given
locale, visiting that slug will change the application locale. While on a page changing the application locale by
hitting the setLocale
route will redirect to the the slug of the page in the selected locale. Pages can have many
sections via the $page->sections(): HasMany
relationship. On $page->delete()
all sections that belong to the page
will be soft deleted and on $page->resotre()
they will be restored automatically.
Page Sections
Page sections provide a simple way for adding additional content to a page. The owning page can be accessed via the
$pageSection->page(): BelongsTo
relationship. When updating a page section if APP_ENV=production
the name will no
longer be editable field because it may be in use in a view or controller to access a given section for a page.
All versions of oxy-nova with dependencies
codezero/laravel-unique-translation Version ^3.0
mrmonat/nova-translatable Version ^2.0
spatie/laravel-translatable Version ^4.2
spatie/laravel-medialibrary Version ^9.0
laravel/nova Version ^3.0
ebess/advanced-nova-media-library Version ^3.0