Search by

haoyuqi / download-bing-wallpaper

haoyuqi

Retrieve Bing wallpaper metadata by date through a versioned JSON Artisan command.

Package info

github.com/haoyuqi/download-bing-wallpaper

pkg:composer/haoyuqi/download-bing-wallpaper

Statistics

Installs: 2 285

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

3.0.0 2026-09-03 14:35 UTC

README

Installation

composer require haoyuqi/download-bing-wallpaper

Usage

<?php

namespace App\Http\Controllers;

use Haoyuqi\DownloadBingWallpaper\Contracts\BingWallpaperInterface;
use Illuminate\Http\Request;

class IndexController extends Controller
{
    protected $bingWallpaper;

    public function __construct(BingWallpaperInterface $bingWallpaper)
    {
        $this->bingWallpaper = $bingWallpaper;
    }

    public function index()
    {
        $content = $this->bingWallpaper->download();

        $this->bingWallpaper->save($content, storage_path('bing-wallpaper'), 'bing-wallpaper.png');
    }
}