OctoberCMS RESTful API plugins

API Generator

Generates RESTful APIs using available models


RESTful API (WebService) for Import/Export Operations with Extended Features


Create RESTful APIs with ease

You can start building your custom REST API based on these plugins.

Frontend User Roles Manager Bugs fixes – for OctoberCMS Shahiem Seymor


Error: Trigger action is not specified

Fix Error: Trigger action is not specified as per https://github.com/octobercms/october/issues/1543
the above need to be added to the button

Yaml / configuration file not found error

Found some bugs in:

  1. /plugins/shahiemseymor/roles/controllers/groups/config_form.yaml
  2. /plugins/shahiemseymor/roles/controllers/groups/config_list.yaml
  3. /plugins/shahiemseymor/roles/controllers/permissions/config_form.yaml
  4. /plugins/shahiemseymor/roles/controllers/permissions/config_list.yaml

Instead of full paths to the config files with ~ or @ you can change it to $/shahiemseymor/roles/controllers/groups/config_form.yaml etc. In the last builds (347, 348) of October I’m getting errors because you used @ in /plugins/shahiemseymor/roles/controllers/groups/config_list.yaml


Markup accessing page parameters as object or array for OctoberCMS

You can access the current URL parameters via this.param and it returns a PHP array.

Accessing page parameters

This example demonstrates how to access the tab URL parameter in a page.

url = "/account/:tab"
{% if this.param.tab == 'details' %}


Here are all your details

{% elseif this.param.tab == 'history' %}

You are viewing a blast from the past

{% endif %}

If the parameter name is also a variable, then array syntax can be used.

url = "/account/:post_id"
{% set name = 'post_id' %}

The post ID is: {{ this.param[name] }}

Laravel E-commerce payment gateway packages

Laravel payment gateway solutions

Omnipay package
PayPal on Laravel 5.2 code example


WestPac payway official document

Comparing Blade and Twig templates in Laravel

Blade and Twig, which one is better ? which one will be your choice?

Let’s read through the comparison article listed here: Comparing Blade and Twig templates in Laravel

In my company, we use Twig instead of Blade for our Laravel projects. I know there are a lot of developers that also prefer Twig over Blade. So the question‘Why choose Twig over Blade?’ often pops up. The reason is usually just a matter of preference, but in this post we’re going to compare the Blade and Twig templating engines side-by-side.

link: https://medium.com/@barryvdh/comparing-blade-and-twig-templates-in-laravel-187fde7fcac9

Playing around WordPress with Laravel Eloquent and MVC

The WordPress code is commonly known as messy and not the best practice, I’ve found some packages/libraries that can empower WordPress with MVC or at least deacent ORM.

Have fun.

WordPress Corcel

Corcel uses Laravel Eloquent models to manage retrieving content directly from your WordPress database. Once installed you can use the same comfortable syntax you are used to:

// All published posts
$posts = Post::published()->get();
$posts = Post::status('publish')->get();

// A specific post
$post = Post::find(31);

It includes support for posts, post types, taxonomies, pages, categories, and attachments. The one downside is the package is still under development.

Link: https://github.com/jgrossi/corcel



WordPlate is a modern WordPress stack which tries to simplify the fuzziness around WordPress development. Using the latest standards from PHP. WordPlate utilizes WordPress as its dependency through Composer.

Link: https://github.com/wordplate/wordplate


Themosis – A MVC framework for WordPress developers.

Build custom websites and applications with WordPress.

themosis A MVC framework for WordPress developers. Build custom websites and applications with WordPress.


Link: http://framework.themosis.com/


Reference: https://laravel-news.com/2016/01/wordpress-and-laravel/

Instant response for OctoberCMS Flash messages combined with Romanov.Flashmessage plugin (no page reload)

$validation = Validator::make($data, $rules);
 if ($validation->fails()) {
     throw new ValidationException($validation);
 try {
     $user = Auth::authenticate([
         'login' => array_get($data, 'login'),
         'password' => array_get($data, 'password')
     ], true);
 catch (Exception $ex) {
     if (preg_match('/user was not found with the given cred/i',$ex->getMessage())) {
     $flash_message = 'A registered user was not found with that email';
 elseif (preg_match('/hashed credential "password" did not match/i',$ex->getMessage())) {
     $flash_message = 'The password supplied for that user is incorrect';
 if ($flash_message) {
     return ['msgs' => [ 'danger' => $flash_message ], 'options' => [], 'settings' => [] ];


This will replace the error message ” user was found to match all plain text credentials however hashed credential “password” did not match.” that comes by default with Laravel.




A laravel validation rules – Check user age with laravel validation rules

Here is the example code for checking the age of an user.

Validator::extend('olderThan', function($attribute, $value, $parameters)
    $minAge = ( ! empty($parameters)) ? (int) $parameters[0] : 13;
    return (new DateTime)->diff(new DateTime($value))->y >= $minAge;

    // or the same using Carbon:
    // return Carbon\Carbon::now()->diff(new Carbon\Carbon($value))->y >= $minAge;


$rules = ['dob' => 'olderThan']; // checks for 13 years as a default age
$rules = ['dob' => 'olderThan:15']; // checks for 15 years etc