connect232/cakephp4-faqs

Faqs plugin for CakePHP

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:cakephp-plugin

v1.0 2021-04-28 11:43 UTC

This package is auto-updated.

Last update: 2024-10-28 19:36:51 UTC


README

Prerequisites

Bootstrap 4

Installation

Run:

composer require connect232/cakephp4-faqs

Usage

Run :

bin/cake plugin load Faqs

Or in your src/Application.php add:

$this->addPlugin('Faqs');

Run migrations:

bin/cake migrations migrate -p Faqs

Add faq element to template file:

<?= $this->element('Faqs.faqs'); ?>

Include css:

<?= $this->Html->css('Faqs.styles'); ?>

or if using AssetCompress plugin in you asset_compress.ini file add:

paths[] = ../vendor/connect232/faqs/webroot/css/*
files[] = styles.css

Add to your routes file:

$routes->prefix('admin', function (RouteBuilder $routes) {
    $routes->loadPlugin('Faqs');
    $routes->fallbacks(DashedRoute::class);
});

Associate with category dataset table:

$this->hasMany('Faqs', [
    'className' => 'Faqs.Faqs',
    'foreignKey' => 'category_dataset_id',
]);