Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from tightenco/mes/laravel-7
Browse files Browse the repository at this point in the history
Update to work for Laravel 8
  • Loading branch information
mattstauffer authored Sep 12, 2020
2 parents 1e09860 + 20be76b commit 42ee696
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
],
"license": "MIT",
"require": {
"php": ">=7.1.0",
"laravel/framework": ">=7.0",
"erusev/parsedown": "^1.7",
"kitetail/zttp": "^0.6"
"php": ">=7.2.5"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 0 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
[![Latest Version on Packagist](https://img.shields.io/packagist/v/tightenco/nova-releases.svg?style=flat-square)](https://packagist.org/packages/tightenco/nova-releases)
[![Total Downloads](https://img.shields.io/packagist/dt/tightenco/nova-releases.svg?style=flat-square)](https://packagist.org/packages/tightenco/nova-releases)

JUST GETTING STARTED.

The card:

<img width="396" alt="screen shot 2018-09-06 at 12 13 19 am" src="https://user-images.githubusercontent.com/151829/45134868-a18fb680-b16a-11e8-98c4-f5583c6009da.png">
Expand All @@ -17,14 +15,6 @@ The tool:
<img width="1256" alt="screen shot 2018-09-10 at 12 07 39 am" src="https://user-images.githubusercontent.com/151829/45276011-e62e9100-b48d-11e8-8217-481f999f9521.png">


Plans:

- [x] Show the latest release on a card and compare it against yours
- [x] Add to the card a big icon to show green or red and a link to upgrade if you're red
- [x] Show all releases in a list in a tool
- [ ] Add a danger state if there are security issues, maybe? or something clever like that?


## Installation

You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:
Expand Down
7 changes: 3 additions & 4 deletions src/Http/Controllers/ReleasesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@

namespace Tightenco\NovaReleases\Http\Controllers;

use Parsedown;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Cache;
use Zttp\Zttp;
use Illuminate\Support\Facades\Http;
use Parsedown;

class ReleasesController extends Controller
{
public function __invoke()
{
$data = Cache::remember('tightenco-nova-releases::releases', 60, function () {
// @todo: Cache it on novapackages.com so as to save load on the Nova folks <3
$response = Zttp::get('https://nova.laravel.com/api/releases')->json();
$response = Http::get('https://nova.laravel.com/api/releases')->json();

$response['releases'] = collect($response['releases'])->map(function ($release) {
$release['html_notes'] = (new Parsedown)->text($release['notes']);
Expand Down

0 comments on commit 42ee696

Please sign in to comment.