noud/laravel-seo-google-structured-data
Composer 安装命令:
composer require noud/laravel-seo-google-structured-data
包简介
Laravel SEO Google Structured data
README 文档
README
Laravel SEO Google Structured data package.
Requirements
- PHP 7.2+
- Laravel 5.6+
Installation
Install the package by running this command in your terminal/cmd:
composer require noud/laravel-seo-google-structured-data
Usage in models
Now you can extend your models from Google Structured data
<?php
namespace App\Models;
use SEO\Google\Structured\data\Models\WebSite as GoogleWebSite;
class WebSiteGoogle extends GoogleWebSite
{}
Structured data and Types used
Google Search Structured data
Google Search Structured data conform Schema.org
- Article can be
- Breadcrumb consists of
- Carousel consists of
- Job Posting is
- Local Business Listing is
Entity-Relationship Diagram
Development
Put this package directory beside your project directory.
In conmposer.json of the target project add
"require": {
"noud/laravel-seo-google-structured-data": "*"
},
"repositories": [
{
"type": "path",
"url": "../laravel-seo-google-structured-data"
}
]
In .env of the target project i set the database to an alternative database
DB_DATABASE=google-structured-data
#DB_DATABASE=seo
Development migration
I migrate just this schema like so in the target project:
php artisan migrate --realpath --path=/var/www/laravel-seo-google-structured-data/src/database/migrations
Development models generation
In the target project set the path and namespace in config/models.php
'path' => app_path('Models-google-structured-data'),
'namespace' => 'SEO\Google\Structured\data\Models',
I generate the models from this schema like so in the target project:
php artisan code:models --schema=google-structured-data
Then copy everything from app/Models-google-structured-data to the package.
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-11
