thecadien/sulu-news-bundle

Simple News Bundle for Sulu 2 CMS

0.0.17-beta 2020-07-12 19:03 UTC

README

GitHub license GitHub tag (latest SemVer) workflows Sulu compatibility

##Requirements

  • PHP 7.3
  • Sulu 2.0.*
  • Symfony 4.3

##Installation

Install the bundle

Execute the following composer command to add the bundle to the dependencies of your project:

composer require thecadien/sulu-news-bundle

Enable the bundle

Enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

return [
    /* ... */
    TheCadien\Bundle\SuluNewsBundle\NewsBundle::class => ['all' => true],
];

###Update schema

bin/console do:sch:up --force

Bundle Config

Define Website Route in routes_website.yaml

app.news:
   path: /news/{id}
   controller: TheCadien\Bundle\SuluNewsBundle\Controller\NewsWebsiteController::indexAction

Define the Admin Api Route in routes_admin.yaml

app_news:
  type: rest
  resource: sulu_news.rest.controller
  prefix: /admin/api
  name_prefix: app.