Comments (6)
I have found now a "quick & dirty" solution like this:
public function __construct() { $this->seo()->opengraph()->setUrl(URL::current()); }
inside the "main" Controller.php
from seotools.
I'm currently working on that
from seotools.
If my next pull gets accepted, it'll happen within the getCanonical() method automatically
from seotools.
GREAT!
from seotools.
@lHoudini Lumen doesn't support Facades, so this should be in more agnostic way.
@MeestorHok did you figured out?
from seotools.
If anyone is still looking to resolve this:
At the very top of /config/seotools.php:
/**
* Set og:url
* Done this way due to ensure no php warnings are encountered when running artisan commands
* Because 'HTTP_HOST' / 'REQUEST_URI' are available only when using browser
*/
if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['REQUEST_URI'])) {
$currentURL = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
} else {
$currentURL = null;
}
return [
'meta' => [ ...
In that same file at 'opengraph' section:
'defaults' => [
'title' => '.........'
'description' => '.........'
'url' => $currentURL,
from seotools.
Related Issues (20)
- Support for PHP 8.1
- Laravel 10 released HOT 1
- Laravel dependency - Error facade HOT 1
- Documentation - OpenGraph - setProduct missing
- OpenGraph - Missing Product attributes
- I have installed artesaos via composer and published after trying to use it doesnt work, please help me HOT 1
- beforeTitle doen't work HOT 1
- Question: SEO Title Different HOT 1
- Support PHPUnit 10
- Livewire
- Non-static method Artesaos\SEOTools\SEOMeta::setTitle() cannot be called statically HOT 1
- missing attribute for setProduct
- - Root composer.json requires artesaos/seotools ^v0.23.0 -> satisfiable by artesaos/seotools[v0.23.0]. HOT 1
- do this package can cache result HOT 2
- Add support for returning the generated seo as an array of strings. Integration with Inertia.js HOT 2
- [Request] Proposal for Google Trends Integration in Laravel SEO Tools
- like the Rank Math plugin in wordpress
- Meta tags added with `SEOMeta::addMeta()` are not rendered HOT 1
- JsonLd not working when used with SEO::generate
- use for laravel 11 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seotools.