puleeno/rake-laravel-adapter
最新稳定版本:1.1.0
Composer 安装命令:
composer require puleeno/rake-laravel-adapter
包简介
The Laravel adapter for Rake migration framework
README 文档
README
Laravel adapter for Ramphor Rake - A PHP web crawler and data migration framework.
Installation
You can install the package via composer:
#!bash
composer require puleeno/rake-laravel-adapter
The package will automatically register its service provider.
Database Migrations
The package includes the necessary database migrations. To run them:
#!bash
php artisan migrate
This will create the following tables:
rake_crawled_urls- Stores URLs to be crawledrake_resources- Stores crawled resourcesrake_relations- Manages relationships between resourcesrake_options- Stores Rake configuration options
Models
The package provides Laravel Eloquent models for all tables:
CrawledUrl- For managing crawl URLsResource- For managing crawled resourcesOption- For managing Rake optionsRelation- Pivot model for resource relationships
Example usage:
#!php
use Rake\LaravelAdapter\Models\CrawledUrl;
use Rake\LaravelAdapter\Models\Resource;
use Rake\LaravelAdapter\Models\Option;
// Create new crawl URL
CrawledUrl::create([
'url' => 'https://example.com',
'rake_id' => 'my-rake-id',
'tooth_id' => 'my-tooth-id'
]);
// Get uncrawled URLs
$urls = CrawledUrl::where('crawled', false)->get();
// Get resource with relationships
$resource = Resource::with(['children', 'parents'])->find($id);
Configuration
You can publish the config file with:
bash
php artisan vendor:publish --tag="rake-config"
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email puleeno@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-14