madeitbelgium / wordpress-eloquent
WordPress Eloquent for Laravel
Fund package maintenance!
madeitbelgium
Requires
- php: >=5.6
- illuminate/database: 5.*|6.*|7.*|8.*
Requires (Dev)
- friendsofphp/php-cs-fixer: 2.11.*
- mockery/mockery: 0.9
- php-coveralls/php-coveralls: ^2.0
- phpunit/phpunit: 7.*|6.*
README
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!