Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Seo Bundle Laravel Package

astina/seo-bundle

View on GitHub
Deep Wiki
Context7

AstinaSeoBundle

Allows management of page title, meta description and meta keywords.

Installation

Step 1: Add to composer.json

"require" :  {
    // ...
    "astina/seo-bundle":"dev-master",
}

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Astina\Bundle\SeoBundle\AstinaSeoBundle(),
    );
}

Step 3: Load routing config

Add routing if you want to be able to edit page meta data directly.

astina_seo:
    resource: "@AstinaSeoBundle/Resources/config/routing.yml"

Warning: make sure to protect this URL in your app/config/security.yml

Usage

Place {{ seo_meta_tags(app.request) }} in your Twig template where you want the meta tags to be rendered.

Parameters:


    /**
     * @param \Symfony\Component\HttpFoundation\Request $request
     * @param string $defaultTitle
     * @param array $defaults
     * @param string $titleSuffix
     * @return string
     */
    public function renderPageMetaTags(Request $request, $defaultTitle = null, array $defaults = array(), $titleSuffix = null)

The function tries to find a PageMetaData entity for the current request and uses it to render the meta tags.

Global Defaults

Configure global default values for title, description and keywords if needed:

# app/config.yml
astina_seo:
    global_defaults:
        title: "Foo App"
        description: "The greatest and bestest app in the internet"
        keywords: "greatest, bestest"

@todo: UI to create/delete PageMetaData entitites.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed