Preparing Your Model
To associate Open Graph Image with a model, the model must implement the following interface and trait:
class YourModel extends Model implements HasGraphify
The package assumes you have a nullable string field named
og_image_urlin your model. If you do not have such field, add the following line to your model migration. If your application is in production, you may need to add this to a modification migration.
If your model does have such a field but with a different field name, you may override the default by adding the following method to your model.
public function getOpenGraphImageUrlField(): string
Last modified 21d ago