2017 © Pedro Peláez
 

library core

HoneyComb CMS package for backend elements

image

honey-comb/core

HoneyComb CMS package for backend elements

  • Saturday, July 28, 2018
  • by jdmitrijev
  • Repository
  • 1 Watchers
  • 1 Stars
  • 801 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 100 Versions
  • 55 % Grown

The README.md

honeycomb-core Build Status

https://github.com/honey-comb/core, (*1)

Description

HoneyComb CMS Core package for backend elements, (*2)

Attention

This is part core package HoneyComb CMS package. It require starter package., (*3)

If you want to use laravel version 5.6.* use core package version 0.3.*, (*4)

Requirement

  • php: ^7.1.3
  • laravel: ^5.7
  • composer, (*5)

    Installation

Begin by installing this package through Composer., (*6)

    {
        "require": {
            "honey-comb/core": "^0.4"
        }
    }

or, (*7)

    composer require honey-comb/core

Laravel integration

To customize middleware: * disable middleware in hc.php file adding value to ignoreDefaultMiddleware property, (*8)

    'ignoreDefaultMiddleware' => [ ],
  • manualy add middleware to kernel.php

Preparation

Users

Make sure to update the User controller in config/auth.php, (*9)

'defaults' => [
    'guard' => 'api',
    'passwords' => 'users',
],
'api' => [
    'driver' => 'passport',
    'provider' => 'users',
],
'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => \HoneyComb\Core\Models\HCUser::class,
    ],
],
'passwords' => [
    'users' => [
        'provider' => 'users',
        'table' => 'hc_user_password_reset',
        'expire' => 60,
    ],
],

Handlers

Make sure to use a exceptions handler trait in app/Exceptions/Handler.php, (*10)

<?php

namespace App\Exceptions;

use HoneyComb\Core\Exceptions\Traits\HCExceptionHandlerTrait;

class Handler extends ExceptionHandler
{
    use HCExceptionHandlerTrait;
}

Database

We recomend to use utf8mb4_unicode_520_ci collation, so you can update it in config/database.php, (*11)

    'collation' => 'utf8mb4_unicode_520_ci'

Passport installation

Migrations

  • In AppServiceProvider register() method add \Laravel\Passport\Passport::ignoreMigrations();
  • publish migrations php artisan vendor:publish --tag=passport-migrations
  • update user_id fields to uuid e.g. $table->integer('user_id'); -> $table->uuid('user_id'); in tables:
    • oauth_auth_codes
    • oauth_access_tokens
    • oauth_clients

Install

php artisan passport:install, (*12)

Commands

Remove default Laravel user migrations (if it is a clean project), (*13)

2014_10_12_000000_create_users_table.php
2014_10_12_100000_create_password_resets_table.php

Run Artisan commands, (*14)

php artisan migrate
php artisan hc:seed
php artisan hc:permissions
php artisan hc:forms
php artisan hc:admin-menu   
php artisan hc:super-admin

The Versions

28/07 2018
12/04 2018

dev-feature/refactoring56

dev-feature/refactoring56 https://github.com/honey-comb/core/

HoneyComb CMS package for backend elements

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jevgenij Dmitrijev
by Mantas Paulauskas
by Vytautas Rimeikis

laravel cms honey honeycomb