1. Go to this page and download the library: Download robuust/craft-fixtures 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/ */
robuust / craft-fixtures example snippets
// We need a copy because Asset will move the temp file
copy(__DIR__.'/assets/product.jpg', 'product.jpg');
return [
[
'tempFilePath' => 'product.jpg',
'filename' => 'product.jpg',
'volumeId' => $this->volumeIds['products'],
'folderId' => $this->folderIds['clothes'],
],
];