Warning!
You probably don't want to use `--force` without also using `--tag=enso-assets`!
composer.json to the version you want (or leave a ^ in the version...)enso composer update --with-dependencies yadda/enso-coreYou will probably need to publish Enso JS, CSS, webpack.mix.js etc.
# Publish ALL files (won't overwrite existing files)
php artisan vendor:publish
# Force re-publish only css and js files
php artisan vendor:publish --force --tag=enso-assets
The name that should be passed to the constructor of a FileUploadFieldResumable should now be the name of the relationship irrespective of the type of relationship. The old way of providing the column name (such as image_id) that will be saved into for belongsTo relationships and setting the relationship name separately will continue to work for now, but is deprecated.
If you have any image presets (i.e. in config/enso/media.php) that use no-upscale you should change that to no-upscale-force-aspect if you want to continue to use the existing functionality. no-upscale will now return an image of an indefinite aspect ratio.
You should add the following to config/enso/media.php to increase the maximum file size to 15MB.
/**
* Max size in MB of a single file uploaded to the media system
*/
'max_file_size' => env('ENSO_MEDIA_MAX_FILE_SIZE', '15'),
UPDATED: To clean up the traits folder, many traits have been moved (and some also renamed) into subfolders. Some content from existing traits has also been moved to new ones, which will need applying to their relvant Model, Config or Controllers:
| Original Trait | New Trait |
|---|---|
Yadda\Enso\Crud\Traits\IsPublishable |
Yadda\Enso\Crud\Traits\Model\IsPublishable |
Yadda\Enso\Crud\Contracts\IsPublishable |
Yadda\Enso\Crud\Contracts\Model\IsPublishable |
Yadda\Enso\Crud\Traits\IsPublishableCrud |
Yadda\Enso\Crud\Traits\Config\IsPublishable |
Yadda\Enso\Crud\Contracts\IsPublishableCrud |
Yadda\Enso\Crud\Contracts\Config\IsPublishable |
Yadda\Enso\Crud\Traits\ControlsPublishableItems |
Yadda\Enso\Crud\Traits\Controller\IsPublishable |
| New: Add to Configs that implement protected records | Yadda\Enso\Crud\Traits\Config\HasProtectedRecords |
Yadda\Enso\Crud\Traits\ControlsProtectedRecords |
Yadda\Enso\Crud\Traits\Controller\HasProtectedRecords |
Yadda\Enso\Crud\Traits\ControlsTemplatedRecords |
Yadda\Enso\Crud\Traits\Controller\HasTemplatedRecords |
UPDATED: Eventy hooks for Crud Controller actions have been updated to use more standardized arguments. Each action should now have the first two arguments as the Request and Config variables respecively, and each filter should have these as their second and third arguments (the first being reserved for the data being filtered). The following is a list of modified hooks:
| Hook | Type | Before | After |
|---|---|---|---|
crud.create |
action | NEW | $config, $request |
crud.create.before |
action | $request, $config |
Removed - use the crud.create action instead |
crud.create.configBeforeSetItem |
filter | $request, $config |
Removed - use the crud.create action instead |
crud.create.item |
filter | $item, $config, $request |
Removed - use the crud.create action instead |
crud.create.configAfterSetItem |
filter | $config, $request |
Removed - use the crud.create action instead |
crud.create.view |
filter | $view_name, $request, $config, $item |
$view_name, $config, $request * |
crud.create.after |
action | $request, $config |
Removed - use the crud.create action instead |
crud.store.before |
action | $request |
$config, $request |
crud.store.request |
filter | $request |
Removed - use the crud.store.before action instead |
crud.store.rules |
filter | $rules |
$rules, $config, $request |
crud.store.messages |
filter | $messages |
$messages, $config, $request |
crud.store.data |
filter | $request_data |
$request_data, $config, $request |
crud.store.item |
filter | $request_data |
Removed - use the crud.store.before action instead |
crud.store.after |
filter | $item, $request |
Removed - use the crud.store.after action instead |
crud.store.after |
action | $request, $item |
$config, $request * |
crud.edit |
action | NEW | $config, $request |
crud.edit.before |
action | $request, $config |
Removed - use the crud.store action instead |
crud.edit.configBeforeSetItem |
filter | $config, $request |
Removed - use the crud.edit action instead |
crud.edit.item |
filter | $item, $request |
Removed - use the crud.edit action instead |
crud.edit.configAfterSetItem |
filter | $config, $request |
Removed - use the crud.edit action instead |
crud.edit.view |
filter | $view_name, $request, $config, $item |
$view_name, $config, $request ** |
crud.edit.after |
action | $request, $config, $item |
Removed - use the crud.edit action instead |
crud.update.before |
action | $request |
$config, $request |
crud.update.rules |
filter | $rules, $item |
$rules, $config, $request ** |
crud.update.messages |
filter | $messages |
$messages, $config, $request ** |
crud.update.request |
filter | $request |
Removed - use the crud.update.before-validation action instead |
crud.update.data |
filter | $request_data |
$request_data, $config, $request |
crud.update.configAfterSetItem |
filter | $config, $request_data |
Removed - use the crud.update.before action instead |
crud.update.after |
filter | $item, $request |
Removed - use the crud.update.after action instead |
crud.update.after |
action | $request, $config, $item |
$config, $request ** |
crud.destroy.item |
filter | $item |
Removed - use the crud.destroy.before action instead |
crud.destroy.before |
action | $request, $item |
$config, $request, $item |
crud.destroy.after |
action | $request |
$config, $request |
crud.reorder.before |
action | $request |
$config, $request |
crud.reorder.id |
filter | $id |
$id, $config, $request |
crud.reorder.change |
filter | $change |
$change, $config, $request |
crud.reorder.after |
action | $updated |
$updated, $config, $request |
Special note: Due to the way that the SettingController turns fields into individual model records, some it's Hooks are in alternate functions to regular Controllers. If needed, update to accomodate the following changes:
| Hook | Type | Before | After |
|---|---|---|---|
crud.edit |
action | NEW | $config, $request |
crud.edit.before |
action | $request, $config |
Removed - use the crud.edit action instead |
crud.settings.modifyConfig |
action | $request, $config |
Removed - use the crud.edit action instead |
crud.settings.modifyConfig |
action | $config, $request |
Removed - use the crud.update.before action instead |
crud.update.rules |
filter | $rules |
$rules, $config, $request |
crud.update.messages |
filter | $messages |
$messages, $config, $request |
* $item may still be accessed via $config->getCreateForm()->getModelInstance().
** $item may still be accessed via $config->getEditForm()->getModelInstance().
To enable Video thumbnails, publish the FFMpeg config file...
php artisan vendor:publish --provider="ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider"
Then add the paths to ffmpeg and ffprobe to `.env. You can get these by running, e.g.
$ which ffmpeg
/usr/bin/ffmpeg
$ which ffprobe
/usr/bin/ffprobe
# .env
FFMPEG_BINARIES=/usr/bin/ffmpeg
FFPROBE_BINARIES=/usr/bin/ffprobe
Crud index actions edit and delete have been migrated it be implementations of IsIndexAction. If you have created your own overrides, it might be worth transferring to the new format.
Crud Config's getIndexActions has been renamed to getFinalIndexActions to make room for a more semantically acurate getIndexActions. If you have overriden this, you should rename your override.
The call to addDeleteButton has been replaced with addDeleteIndexAction in a Crud Config's default configure behaviour. If you have overriden this, you should update accordingly.
The base CreatePagesTable migration has been updated with the following changes; title has been made nullable, slug has been made nullable, order has been given a default value of 0, parent_id has been indexed. You should make your own migration to implement these changes.
You will need to re-publish config to get new config file
php artisan vendor:publish --provider "Yadda\Enso\EnsoServiceProvider" --tag enso-config
Update version of Ensō packages, referencing this page & follow the Laravel upgrade guides from 6.x to 7.0 and 7.x to 8.0.
If you move models from the app directory into app/Models in line with the new Laravel structure, you should update your crud config files accordingly, and check that any custom Cruds have had their $this->model() calls updated to match.
If you user the default PageSeeder but choose NOT to move your models to their own directory as described above, you will need to duplicate and user the PageSeeder from Ensō, changing the Model import from App\Models\Page to App\Page.