Download the PHP package yhshanto/larapress without Composer
On this page you can find all versions of the php package yhshanto/larapress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yhshanto/larapress
More information about yhshanto/larapress
Files in yhshanto/larapress
Package larapress
Short Description Wordpress Plugin Boilerplate in laravel 5.5.* flavour.
License MIT
Informations about the package larapress
LaraPress - Wordpress Plugin Boilerplate in laravel 5.5.* flavour.
Requirements
- PHP >=7.0
- WORDPRESS >= 4.x.x
Installation
After install larapress project open plugin-name.php file and edit following as your need.
Usage
Database
To Use Wordpress Database like Laravel Eloquent Style, First Create A class in plugin directory which extend Illuminate\Database\Eloquent\Model Class.
Example plugin/Post.php
You Can Use It Like Plugin\Post::all() Which return all post from wordpress database.
To learn More about Laravel Eloquent. Go To Doc
Blade View
LaraPress also include Laravel Blade Template Engine To Compile And Render View.
All view file must be store in resources/views folder.
Example: resources/views/welcome.blade.php
You Can Use This View By view( $view, $data = array(), $return = false ) function.
Example: Echo This View
Or To return
To learn More about Laravel Blade Template Engine. Go To Doc
Wordpress Action Hook
Wordpress makes life easier by its hooking functionality. LaraPress brings a more easier and formatted way to working with wordpress action and filter hook.
In Larapress you can create special Hook class that uses for hooking.
All hooks class must be store in plugin/Hooks folder.
A Hook Example: plugin/Hooks/Auto.php
After Creating A New Hook class You Must Add it with $hooks array which located in config/plugin.php
Example: config/plugin.php $hooks Array
The $loader property of all hook class is a object of Plugin\Lpress\Loader Class. Which have two function for hooking. Functions -