How to add keywords in meta tag

0 votes
I have a categories table and I want to add categories title in meta tag like this.

     <meta name="keywords" content="HTML, CSS, JavaScript">

I see this demo

     <meta name="keywords" content="[HTML, CSS, JavaScript]">

It adds this `[]`. I want to remove `[]`.

AppServiceProvider.php

    view()->composer('Home.master', function ($view) {
        $view->with('category', Category::query()->select('title'));
    });

master.blade.php

    <meta name="keywords" content="{{ $category->pluck('title') }}">
Jun 20, 2022 in Laravel by Mahmoud

edited Mar 4 358 views