Skip to content

bredecl/corcel-multisite

 
 

Repository files navigation

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.

New functionalities

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.

Blog

List all blogs from the connections

use Corcel\Model\Blog;
[...]
$blogs = Blog::get();

Blog Options

use Corcel\Model\Blog;
[...]
$blogs = Blog::get();
foreach($blogs as $blog){
    $data = $blog->options();
    dump($data);
    dump($data->where("option_name", "siteurl")->first());
    /// ...etc
}

Licence

MIT License © Junior Grossi MIT License copyleft - Brede Basualdo Serraino

About

WIP: Use WordPress multisite backend with Laravel or any PHP application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%