geofftech/laravel-opengraph

OpenGraph configuration for Laravel

Installs: 100

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/geofftech/laravel-opengraph

1.0.1 2025-04-13 10:19 UTC

This package is auto-updated.

Last update: 2025-09-09 04:48:14 UTC


README

  • define OpenGraph values used when sharing pages on social media platforms

Usage examples

  • in render function
public function render(OpenGraph $og)
{
    if (!$this->project->is_published) {
        abort(404);
    }

    $og->title($this->project->name);

    return view('livewire.pages.project-show-page');
}

Implementation

  • add to layout head
<x-opengraph::head />
  • remove any title tags that may be there

Tutorials

Card Validators