webundle/puzzle-app-blog

管理博客或新闻

安装: 3

依赖项: 0

建议者: 0

安全: 0

星级: 0

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

1.0.0 2018-09-24 13:21 UTC

This package is auto-updated.

Last update: 2024-09-25 08:08:31 UTC


README

=========================

拼图应用包

步骤 1: 下载包

打开命令行,进入你的项目目录并执行以下命令以下载此包的最新稳定版本

composer require webundle/puzzle-app-blog

步骤 2: 启用包

然后,通过将其添加到项目app/AppKernel.php文件中注册的包列表中来启用包

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
{
    $bundles = array(
    // ...

    new Puzzle\App\BlogBundle\PuzzleAppBlogBundle(),
                    );

 // ...
}

 // ...
}

步骤 3: 注册路由

在应用程序中加载包的路由定义(通常在app/config/routing.yml文件中)

app/config/routing.yml

puzzle_app:
        resource: "@PuzzleAppBlogBundle/Resources/config/routing.yml"

步骤 4: 配置包

然后,通过将其添加到项目app/config/config.yml文件中注册的包列表下进行配置

# Puzzle App Blog
puzzle_app_blog:
    title: blog.title
    description: blog.description
    icon: blog.icon
    templates:
        article:
            list: 'AppBundle:Blog:list_articles.html.twig'
            show: 'AppBundle:Blog:article.html.twig'
        category:
            list: 'AppBundle:Blog:list_categories.html.twig'
            show: 'AppBundle:Blog:category.html.twig'
        comment:
            list: 'AppBundle:Blog:list_comments.html.twig'
            create: 'AppBundle:Blog:create_comment.html.twig'
            show: 'AppBundle:Blog:comment.html.twig'