PHPackages                             cybercog/robots-txt - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cybercog/robots-txt

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cybercog/robots-txt
===================

Robots.txt Generator

v1.2.1(9y ago)02.4kPHPPHP ^5.6 || ^7.0

Since Jul 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/cybercog/robots-txt)[ Packagist](https://packagist.org/packages/cybercog/robots-txt)[ RSS](/packages/cybercog-robots-txt/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Robots.txt Generator
====================

[](#robotstxt-generator)

[![Build Status](https://camo.githubusercontent.com/58f061f6360f75ace5e464c247a7e333d341e159bf832e0aff8102bd77977fff/68747470733a2f2f7472617669732d63692e6f72672f6379626572636f672f726f626f74732d7478742e737667)](https://travis-ci.org/cybercog/robots-txt)[![StyleCI](https://camo.githubusercontent.com/1efc675735f3013fab49e0a5643cad7400529a3c54518fb6243075a015850aed/68747470733a2f2f7374796c6563692e696f2f7265706f732f36323535383336312f736869656c64)](https://styleci.io/repos/62558361)[![Total Downloads](https://camo.githubusercontent.com/30fc58664b4e9e1ddd02ea374aacc118481d0228973137dde9ecbb9be67aa206/68747470733a2f2f706f7365722e707567782e6f72672f6379626572636f672f726f626f74732d7478742f642f746f74616c2e737667)](https://packagist.org/packages/cybercog/robots-txt)[![Latest Stable Version](https://camo.githubusercontent.com/b20f078b1ac6005b3ba6747e83ce717662f42705979f942b343ffe37871e20da/68747470733a2f2f706f7365722e707567782e6f72672f6379626572636f672f726f626f74732d7478742f76657273696f6e)](https://packagist.org/packages/cybercog/robots-txt)[![License](https://camo.githubusercontent.com/9792a7fef684bfdd938daa122753528e98e96d99a8f7bf26f526660370c6dc2c/68747470733a2f2f706f7365722e707567782e6f72672f6379626572636f672f726f626f74732d7478742f6c6963656e7365)](https://github.com/cybercog/robots-txt/blob/master/LICENSE)

RobotsTxt is a package to dynamically create robots.txt files. It's made to work with Laravel and native PHP.

Checkout the `RobotsTxt.php` class for a full understanding of the functionality.

[This is fork of Robots package](https://github.com/jayhealey/Robots)

Installation
------------

[](#installation)

### Downloading

[](#downloading)

As usual with Composer packages, there are two ways to install:

You can install via Composer. Pick the "master" as the version of the package.

```
composer require cybercog/robots-txt
```

Or add the following to your `composer.json` in the `require` section and then run `composer update` to install it.

```
{
    "require": {
        "cybercog/robots-txt": "^1.0"
    }
}
```

### Usage

[](#usage)

#### Laravel

[](#laravel)

Once installed via Composer you need to add the service provider. Do this by adding the following to the 'providers' section of the application config (usually `app/config/app.php`):

```
Cog\RobotsTxt\Providers\RobotsTxtServiceProvider::class,
```

The quickest way to use Robots is to just setup a callback-style route for `robots.txt` in your `/app/routes.php` file.

```
