PHPackages                             hskrasek/laravel-sunset - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hskrasek/laravel-sunset

ActiveLibrary

hskrasek/laravel-sunset
=======================

1.0.0(8y ago)112MITPHPPHP &gt;=7.0.0

Since Nov 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/hskrasek/laravel-sunset)[ Packagist](https://packagist.org/packages/hskrasek/laravel-sunset)[ RSS](/packages/hskrasek-laravel-sunset/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Laravel Sunset
==============

[](#laravel-sunset)

[![Build Status](https://camo.githubusercontent.com/2ce8c6d5c7831d790e8d4ce428afe0fe047d52c32188f9600030f918dd6d138f/68747470733a2f2f7472617669732d63692e6f72672f68736b726173656b2f6c61726176656c2d73756e7365742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/hskrasek/laravel-sunset)[![MIT License](https://camo.githubusercontent.com/8c3fd4e91799bbb5f887e1a50757097727a0ed93b440e74b289c2fb349faf0fc/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3030303030302e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Laravel Sunset allows you to deprecate URLs (API or otherwise).

The [Sunset header](https://tools.ietf.org/html/draft-wilde-sunset-header-03) is an in-development HTTP response header that is aiming to standardize how URLs are marked for deprecation. tl:dr; it looks a bit like this:

```
Sunset: Sat, 31 Dec 2018 23:59:59 GMT

```

This can be combined with a `Link:  rel="sunset"` which can be anything that might help a developer know what is going on. Maybe link to your API documentation for the new resource, the OpenAPI/JSON Schema definitions, or even a blog post explaining the change.

Install
-------

[](#install)

Via Composer

```
composer require hskrasek/laravel-sunset
```

Usage
-----

[](#usage)

Within your base controller, add the following:

```
