madeitbelgium/wordpress-eloquent

WordPress Eloquent for Laravel

1.2.0 2020-09-08 20:05 UTC

This package is auto-updated.

Last update: 2024-12-09 04:50:49 UTC


README

Build Status Coverage Status Latest Stable Version Latest Unstable Version Total Downloads License

This laravel packages add all the models to use a WordPress database in your Laravel application.

Installation

composer require madeitbelgium/wordpress-eloquent

Or require this package in your composer.json and update composer.

"madeitbelgium/wordpress-eloquent": "^1.0"

Documentation

Installation

Change your user model, and extend it to MadeITBelgium\WPEloquent\Model\User.

<?php

namespace App;

...
use MadeITBelgium\WPEloquent\Model\User as WPUser;
...

class User extends WPUser
{
  ...
}

Custom post type

<?php

namespace App;

use MadeITBelgium\WPEloquent\Model\Post;

class CustomPostType extends Post
{
    protected $post_type = 'custom_post_type';

}

The complete documentation can be found at: http://www.madeit.be/

Support

Support github or mail: tjebbe.lievens@madeit.be

Contributing

Please try to follow the psr-2 coding style guide. http://www.php-fig.org/psr/psr-2/

License

This package is licensed under LGPL. You are free to use it in personal and commercial projects. The code can be forked and modified, but the original copyright author should always be included!