Comments (5)
sry, the meta facade have another name, use SEOMeta facade instead
SEOMeta::setKeywords('key1,key2,key3');
and use only one string parameter instead of three (or an array)
Or the trait
$this->seo()->metatags()->setKeywords(['key1', 'key2', 'key3']);
or you could instantiate yourself
$seo = app()->make('seotools.metatags');
$seo->setDescription(['key1', 'key2', 'key3']);
from seotools.
I tried adding them like this too:
SEO::addMeta('keywords', $work->tags()->pluck('tag')->toArray(), 'name');
and I got the same error but this time for addMeta
:
Call to undefined method Artesaos\SEOTools\SEOTools::addMeta()
from seotools.
try this:
use Artesaos\SEOTools\SEOTools as SEO;
...
SEO::setKeywords('key1, key2, key3');
or using the trait:
$this->seo()->metatags()->setKeywords(['key1', 'key2', 'key3']);
from seotools.
This made another error for the working ones ( setTitle for example ):
Non-static method Artesaos\SEOTools\SEOTools::setTitle() should not be called statically, assuming $this from incompatible context
I thought it might be conflicted then I used this:
use Artesaos\SEOTools\SEOTools as SEOA;
---
SEOA::setKeywords('key1', 'key2', 'key3');
but it gave me the same error:
Call to undefined method Artesaos\SEOTools\SEOTools::setKeywords()
from seotools.
This is it ! , Thank you so much, so the function called metatags()
, this is what I was missing.
SEO::metatags()->setKeywords(['key1', 'key2', 'key3']);
This works perfectly too. Thank you for helping me I really appreciate it. This Package is so helpful ! 😃
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.