Improve exception handling and model binding

This commit is contained in:
Jonny Barnes 2020-08-09 15:54:10 +01:00
parent e9ca934cb4
commit 0fca80e7e4
22 changed files with 148 additions and 82 deletions

View file

@ -73,9 +73,9 @@ class FeedsController extends Controller
/**
* Returns the blog JSON feed.
*
* @return \Illuminate\Http\JsonResponse
* @return array
*/
public function blogJson()
public function blogJson(): array
{
$articles = Article::where('published', '1')->latest('updated_at')->take(20)->get();
$data = [
@ -106,7 +106,7 @@ class FeedsController extends Controller
/**
* Returns the notes JSON feed.
*
* @return \Illuminate\Http\JsonResponse
* @return array
*/
public function notesJson()
{