PHP code example of karabinse / fabriq-connector
1. Go to this page and download the library: Download karabinse/fabriq-connector 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/ */
karabinse / fabriq-connector example snippets
return [
'base_url' => env('FABRIQ_CONNECTOR_BASE_URL', 'http://localhost'),
'enable_cache' => env('FABRIQ_CONNECTOR_ENABLE_CACHE', false),
'cache_expiry' => env('FABRIQ_CONNECTOR_CACHE_EXPIRY', (3600 * 24) * 7),
'cache_driver' => env('FABRIQ_CONNECTOR_CACHE_STORE', 'file'),
'fabriq_connector_token' => env('FABRIQ_CONNECTOR_TOKEN', ''),
];
$connector = new FabriqConnector(locale: 'en');
$request = new GetContactsRequest(params: [' "id": 1,
// "locale": "sv",
// "name": "Frans Rosander",
// "email": "[email protected] ",
// "phone": "+46 (44) 28 71 11",
// "mobile": "+46 (0)702 - 99 09 41",
// "published": 1,
// "sortindex": 1,
// "created_at": "2024-04-11T11:33:17.000000Z",
// "updated_at": "2024-05-30T08:18:48.000000Z",
// "content": {
// "data": {
// "body": "",
// "position": "",
// "image": {
// "id": 56,
// "file_name": "IMG_5966_FransR.jpg",
// "src": "",
// "thumb_src": "",
// "webp_src": "",
// "srcset": "",
// "alt_text": "",
// "caption": null,
// "mime_type": "image\/jpeg",
// "size": 23076,
// "width": 150,
// "height": 187,
// "custom_crop": false,
// "responsive": "",
// "x_position": "50%",
// "y_position": "50%",
// "meta_id": 13
// },
// "enabled_locales": null
// }
// }
// }
// ]
bash
php artisan vendor:publish --tag="fabriq-connector-config"