public function robots()
 {
     $robots = new Robots();
     if (app()->environment() == 'production') {
         $robots->addUserAgent('*');
         $robots->addAllow('*');
     } else {
         $robots->addDisallow('*');
     }
     return response($robots->generate(), 200, ['Content-type' => 'text/plain']);
 }
Beispiel #2
0
 public function testReset()
 {
     $robots = new Robots();
     $this->assertEquals("", $robots->generate());
     $robots->addComment("First Comment");
     $robots->addHost("www.google.com");
     $robots->addSitemap("sitemap.xml");
     $this->assertNotEquals("", $robots->generate());
     $robots->reset();
     $this->assertEquals("", $robots->generate());
 }