PHP code example of gooddaywp / primera-lib
1. Go to this page and download the library: Download gooddaywp/primera-lib 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/ */
gooddaywp / primera-lib example snippets
// Init:
primera([
'viewsDir' => get_theme_file_path('source/views/'),
'cacheDir' => trailingslashit(wp_get_upload_dir()['basedir']).'blade-cache',
]);
// Add Blade component alias:
primera('blade')->component('components.navbar');
// Rendering views via AJAX:
primera('blade')->render($templateName, $dataArr);