Git Product home page Git Product logo

Comments (5)

edbizarro avatar edbizarro commented on May 20, 2024 1

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.

ahmadyousefdev avatar ahmadyousefdev commented on May 20, 2024

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.

edbizarro avatar edbizarro commented on May 20, 2024

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.

ahmadyousefdev avatar ahmadyousefdev commented on May 20, 2024

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.

ahmadyousefdev avatar ahmadyousefdev commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.