public function testLastModified() { $parser = new Parser(); $lastModified = $parser->getLastModified(); // let's verify the date format $parsed = DateTime::createFromFormat('M jS (D)', $lastModified); $this->assertEquals($parsed->format('M jS (D)'), $lastModified); }
<?php use Paplauskas\ApiDocs\Parser; Route::get('apidocs', function () { $parser = new Parser(); return view('apidocs::index', ['lastModified' => $parser->getLastModified(), 'endpoints' => $parser->parseEndpoints()]); });