A collection of Model classes that allows you to get data directly from a WordPress database.
NOW with Multi Site Support
This package keeps all the work from the original jgrossi/Corcel but extends it to support WordPress Multisite.
NOTE
In WordPress the Table where the sites are located is called blogs instead of sites, and the sites table contains the definition of the main container of blogs.
List all blogs from the connections
use Corcel\Model\Blog;
[...]
$blogs = Blog::get();use Corcel\Model\Blog;
[...]
$blogs = Blog::get();
foreach($blogs as $blog){
$data = $blog->options();
dump($data);
dump($data->where("option_name", "siteurl")->first());
/// ...etc
}MIT License © Junior Grossi MIT License copyleft - Brede Basualdo Serraino