ibnnajjaar / graphify
A simple open graph image generator for Laravel blogs.
v0.3.3
2023-03-08 17:14 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^10.2
- spatie/browsershot: ^3.0.0
- spatie/laravel-package-tools: ^1.14
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- spatie/laravel-ray: ^1.26
README
Generating open graph images will be made easy with the use of this package.
Documentation
See the documentation for detailed installation and usage instructions.
What It Does
Generating Open Graph Images
If the model preparation is done correctly, an OG Image will be created when a new record is created.
Manually Triggering OG Image Generation
To manually trigger OG Image generation, you can call generateGraphify() method on your model instance as below.
$yourModel->generateGraphify();
Retrieving OG Images
To retreive a generated OG image, you can use the below methods.
$yourModel->graphify_image; $yourModel->og_image_url; // Or if you have a custom image field $yourModel->your_custom_og_image_url;
Credits
License
The MIT License (MIT). Please see License File for more information.