PHP code example of maestroerror / statamic-magic-import
1. Go to this page and download the library: Download maestroerror/statamic-magic-import 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/ */
maestroerror / statamic-magic-import example snippets
return [
/*
* Enable downloading images. The default is 'true'.
*/
'download_images' => true,
/**
* The name of the assets container where images should be downloaded.
*/
'assets_container' => 'assets',
/*
* Whether to skip download of an image if it already exist. The default is 'false'.
*/
'skip_existing_images' => false,
/*
* Enable image overwriting. When set to false, a new image are created with a timestamp suffix, if the image already exists. The default is 'false'.
*/
'overwrite_images' => false,
/*
* Set images as Asset object, path or ID
* Possible values: path, object, id (If none of them is set 'path' will be used)
*/
'set_images_as' => "path",
/*
* Sets data in same manner as in CP controller, processing via blueprint's fields
* Skips field if any error occured and logs the error
*/
'set_data_using_fields' => false,
/*
* In case if you are updating your images path with some suffix, for example ".webp"
*/
'image_suffix' => "",
/*
* Filter out meta data keys prefixed with '_'. The default is 'true'.
*/
'exclude_underscore_data' => true,
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.