geofftech/laravel-opengraph

OpenGraph configuration for Laravel

1.0.1 2025-04-13 10:19 UTC

This package is auto-updated.

Last update: 2025-07-09 04:30:24 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