{"id":13828241,"url":"https://github.com/code4mk/lara-head","last_synced_at":"2025-04-07T06:10:20.947Z","repository":{"id":56954906,"uuid":"183821053","full_name":"code4mk/lara-head","owner":"code4mk","description":"Easily setup SEO in your laravel project with lara-head :heart: @code4mk","archived":false,"fork":false,"pushed_at":"2020-01-09T17:07:01.000Z","size":9,"stargazers_count":176,"open_issues_count":0,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T05:03:55.077Z","etag":null,"topics":["0devco","code4mk","head","laravel","laravel-meta","laravel-seo","php","seo"],"latest_commit_sha":null,"homepage":"https://code4mk.org","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code4mk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-27T20:58:16.000Z","updated_at":"2025-01-28T01:10:20.000Z","dependencies_parsed_at":"2022-08-21T08:50:12.562Z","dependency_job_id":null,"html_url":"https://github.com/code4mk/lara-head","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Flara-head","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Flara-head/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Flara-head/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Flara-head/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code4mk","download_url":"https://codeload.github.com/code4mk/lara-head/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601448,"owners_count":20964864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["0devco","code4mk","head","laravel","laravel-meta","laravel-seo","php","seo"],"created_at":"2024-08-04T09:02:38.067Z","updated_at":"2025-04-07T06:10:20.918Z","avatar_url":"https://github.com/code4mk.png","language":"PHP","readme":"\u003cp align=\"center\" \u003e\u003cimg src=\"https://user-images.githubusercontent.com/17185462/56885908-85d97780-6a8f-11e9-81ef-e7e6ac49d1ed.PNG\"\u003e\u003c/p\u003e\n\n# installation\n\n```bash\ncomposer require code4mk/lara-head\n```\n\n# usage meta\n\n~ inside controller\n\n```php\nuse Khead;\nclass Test\n{\n  public function home()\n  {\n    Khead::setMeta('viewport',[\n      \"name\" =\u003e \"viewport\",\n      \"content\"=\u003e\"width=device-width, initial-scale=1\"\n    ]);\n  }\n}\n```\n\n~ inside blade \u003caccess\u003e\n\n```php\n{{ Khead::getMeta('viewport') }}\n// \u003cmeta name=\"bladeport\" content=\"width=device-width, initial-scale=1\"\u003e\n```\n\n# link\n\n```php\nKhead::setLink('author',[\n  \"rel\"=\u003e\"author\",\n  \"href\"=\u003e\"humans.txt\"\n]);\n// blade\n{{ Khead::getLink('author') }}\n// \u003clink rel=\"author\" href=\"humans.txt\"\u003e\n```\n\n# script\n\n```php\nKhead::setScript('one',[\n  \"src\"=\u003e\"test.js\",\n]);\n// blade\n{{ Khead::getScript('one') }}\n// \u003cscript src=\"test.js\"\u003e\u003c/script\u003e\n```\n# title\n\n```php\nKhead::setTitle('this is a title');\n// blade\n{{ Khead::getTitle() }}\n```\n\n# facebook open graph\n\n```php\nKhead::setOg([\n  \"app_id\" =\u003e [\n    \"property\"=\u003e\"fb:app_id\",\n    \"content\"=\u003e\"123456789\"\n  ],\n  \"url\" =\u003e [\n    \"property\"=\u003e\"og:url\",\n    \"content\"=\u003e\"https://example.com/page.html\"\n  ],\n  \"type\" =\u003e [\n    \"property\"=\u003e\"og:type\", \"content\"=\u003e\"website\"\n  ],\n  \"title\" =\u003e [\n    \"property\"=\u003e\"og:title\",\n    \"content\"=\u003e\"Content Title\"\n  ],\n  \"image\" =\u003e [\n    \"property\"=\u003e\"og:image\",\n    \"content\"=\u003e\"https://example.com/image.jpg\"\n  ],\n  \"description\" =\u003e [\n    \"property\"=\u003e\"og:description\",\n    \"content\"=\u003e\"Description Here\"\n  ],\n  \"site_name\" =\u003e [\n    \"property\"=\u003e\"og:site_name\",\n    \"content\"=\u003e\"Site Name\"\n  ],\n  \"locale\" =\u003e [\n    \"property\"=\u003e\"og:locale\",\n    \"content\"=\u003e\"en_US\"\n  ],\n  \"author\" =\u003e [\n    \"property\"=\u003e\"article:author\",\n    \"content\"=\u003e\"@code4mk\"\n  ]\n]);\n// blade\n{{ Khead::getOg() }}\n```\n\n# twitter cards\n\n```php\nKhead::setTwitCards([\n  \"card\" =\u003e [\n    \"name\" =\u003e \"twitter:card\",\n    \"content\"=\u003e\"summary\"\n  ],\n  \"site\" =\u003e [\n    \"name\"=\u003e\"twitter:site\",\n    \"content\"=\u003e\"@code4mk\"\n  ],\n  \"creator\" =\u003e [\n    \"name\"=\u003e\"twitter:creator\",\n    \"content\"=\u003e\"@code4mk\"\n  ],\n  \"url\" =\u003e [\n    \"name\"=\u003e\"twitter:url\",\n    \"content\"=\u003e\"https://code4mk.org\"\n  ],\n  \"title\" =\u003e [\n    \"name\"=\u003e\"twitter:title\",\n    \"content\"=\u003e\"Content Title\"\n  ],\n  \"description\" =\u003e [\n    \"name\"=\u003e\"twitter:description\",\n    \"content\"=\u003e\"Content description less than 200 characters\"\n  ],\n  \"image\" =\u003e [\n    \"name\"=\u003e\"twitter:image\",\n    \"content\"=\u003e\"https://code4mk.org/image.jpg\"\n  ],\n  \"dnt\" =\u003e [\n    \"name\"=\u003e\"twitter:dnt\",\n    \"content\"=\u003e\"on\"\n  ]\n]);\n// blade\n{{ Khead::getTwitCards() }}\n```\n\n# Head tags\n\n* [gist link](https://gist.github.com/lancejpollard/1978404)\n* [gethead](https://gethead.info/)\n\n\u003ca href=\"https://twitter.com/0devco\" target=\"_blank\" \u003e\u003cp align=\"center\" \u003e\u003cimg src=\"https://raw.githubusercontent.com/0devco/docs/master/.devco-images/logo-transparent.png\"\u003e\u003c/p\u003e\u003c/a\u003e\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode4mk%2Flara-head","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode4mk%2Flara-head","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode4mk%2Flara-head/lists"}