Weave 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

Ec Bundle Laravel Package

elvandar/ec-bundle

View on GitHub
Deep Wiki
Context7

EcBundle

Small Bundle to help use externals urls inside a symfony project.

The goal is to help the communication by centralizing all the routes inside a single configuration fila and providing methods to use thems.

Installation

Open a command console, enter your project directory and execute:

$ composer require <package-name>

Hom to use the bundle

Inside elvandar_ec.yml, you can configure your sites and routes:

    site:
        routes:
            name: 'http://path/to/your/site'

The file is organised betwin sites. Each site represents a grouping of urls under the routes list.

Configuration example

    your_first_site:
        routes:
            home: 'http://first-site/'
            description: 'http://first-site/description'
            contact: 'http://first-site/contact'
    your_second_site:
        routes:
            home: 'http://second-site/'
            contact: 'http://second-site/contact'
            blog: 'http://second-site/blog'
            
    The name of your site: # the name you want to give to your site
        routes:            # a list of the site routes
            Name: 'URL'    # name of the route : url of the route

Use the service

You can now use the Externals service to retrieve :

    $externals = $this->container->get('ec');
    
    $externals->getRoute('contact', 'your_second_site');

or redirect to the desired route :

    $externals = $this->container->get('ec');

    $externals->redirectToExternal('description', 'your_first_site');

Bboth the redirectToEcternal and getRoute methods follow the same parameters rules:

1 - First parameter

The first parameter is the name of your route.

For example inside the example configuration, the name for http://second-site/blog is blog.

This parameter is required.

2 - Second parameter

The second parameter is the name of the site. It is not required but will be needed if multiple roads have the same name.

For example, the second parameter is not needed for the blog route but will be needed for the home or the contact routes.

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.
teamzac/geocoder
ideatica/config-writer
keaton-php/pipe-dream
jacksonwebservices/laravel-user-suite
maksimru/conditional-laravel-debugbar
gismatul/nova-support-chat
gismatul/laravel-support-chat
networkrailbusinesssystems/oracle-api
alphabalex/messaging-made-easy
rawphp/warp
shootkiran/merobug
narakode/fineauth
numencode/wn-syncops-plugin
ibnnajjaar/mib-global-pay
ably/pubsub-server
mstfkhazaal/defender
mfonte/base62x
karnoweb/metapilot
tobya/bcsapiwrapper
swalker2/cpanel