PHP code example of ichinya / lara-wp
1. Go to this page and download the library: Download ichinya/lara-wp 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/ */
ichinya / lara-wp example snippets
return [
];
$post = \Ichinya\LaraWP\Models\Post::find(1);
# or
$post = \Ichinya\LaraWP\Models\Post::query()->with('meta')->status(PostStatuses::Draft)->first();
# or
$post = \Ichinya\LaraWP\Models\Post::query()->with('meta')->published()->first();
dd($post);
bash
php artisan vendor:publish --tag="lara-wp-config"
bash
php artisan vendor:publish --tag="lara-wp-views"