ghanem/themoviedb 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ghanem/themoviedb

Composer 安装命令:

composer require ghanem/themoviedb

包简介

schedule movie seeder API Service from https://www.themoviedb.org

README 文档

README

Total Downloads

Installation

You can install the package via composer:

composer require ghanem/themoviedb

first you should run migration it will make migration

php artisan migrate

now you need to publish the config file with:

php artisan vendor:publish --provider="Ghanem\Themoviedb\ThemoviedbServiceProvider" --tag="config"

Integration

first you need to create account in themoviedb and submit to get key

in .env add your key

THEMOVIEDB_KEY=5ff64c4b2fa1a61026e627a62XxXxX

Seed Movies

this package create command to seed Movies and Genres

php artisan themoviedb:seed top_rated_movies

to change Number of Records in .env add your num_of_records

THEMOVIEDB_NUM_OF_RECORDS=95

by default 100 recourds

to use laravel Queue to handle the seeder task just enable it in .env:

THEMOVIEDB_ENABLE_QUEUE=true

by default false

Endpoint Movies

you can access Endpoint form

{domian}/movies

if you need add prefix or midlware just open config/themoviedb.php

return [
     ....
    'prefix' => '/',
    'middleware' => ['web'],
];

schedule seed movies

to schedule seed movies we need to use php cron job and laravel Task Scheduling. in app/Console/Kernel.php file's schedule method just add

     $schedule->command('themoviedb:seed top_rated_movies --force')->daily();

and can change daily to ather method that laravel accepts here

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固