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

Relay Base Course Bundle Laravel Package

dbp/relay-base-course-bundle

View on GitHub
Deep Wiki
Context7

DbpRelayBaseCourseBundle

GitHub | Packagist

Test

Base Symfony bundle for courses for the DBP Relay API Server.

Integration into the Relay API Server

  • Add the bundle package as a dependency:
composer require dbp/relay-base-course-bundle
  • Add the bundle to your config/bundles.php:
...
Dbp\Relay\BasePersonBundle\DbpRelayBaseCourseBundle::class => ['all' => true],
...
];
  • Run composer install to clear caches

Course provider implementation

For this bundle to work you need to add a service that implements the CourseProviderInterface to your application.

Example

Service class

For example, create a service src/Service/CourseProvider.php:

<?php

namespace App\Service;

use Dbp\Relay\BaseCourseBundle\API\CourseProviderInterface;
use Dbp\Relay\BaseCourseBundle\Entity\Course;

class CourseProvider implements CourseProviderInterface
{
    public function getCourseById(string $identifier, array $options = []): ?Course
    {
        $course = new Course();
        $course->setIdentifier($identifier);
        $course->setName('Field Theory');
        $course->setDescription('News from field theory');

        return $course;
    }
    
    ...
}

Services configuration

For the example service above you need to add the following to your src/Resources/config/services.yaml:

  Dbp\Relay\BaseCourseBundle\API\CourseProviderInterface:
    '@App\Service\CourseProvider'
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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator