archco / MetaTag by Cosmos

The helper class for make html meta tag on php and laravel.
34
0
3
Package Data
Maintainer Username: Cosmos
Maintainer Contact: archcoster@gmail.com (archco)
Package Create Date: 2016-12-01
Package Last Update: 2020-01-04
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2025-02-06 03:15:25
Package Statistics
Total Downloads: 34
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 0
Total Open Issues: 1

MetaTag

It's the library class for helpful the making html meta tags.

Install

composer require cosmos/metatag

Usage

Basic


use Cosmos\MetaTag\MetaTag;

$data = [
  'description' => "The helper class for make html meta tag on php and laravel.",
  'author' => 'archco',
  'keywords' => ['PHP', 'Composer', 'Code', 'Github']
];

$metaTag = new MetaTag($data);

echo $metaTag->display();

Modify data


use Cosmos\MetaTag\MetaTag;

$meta = new MetaTag($data);

// add property
$meta->good = "thing";
$meta->set('name', 'content');

// modify property
$meta->author = "James";
$meta->set('name', 'another content');

// remove property
$meta->remove('good');

License

MIT License