PHPackages                             scottybo/textlocal - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. scottybo/textlocal

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

scottybo/textlocal
==================

Laravel Text Local Package

1.3.0.0(8y ago)48.0k↓89.6%5[3 issues](https://github.com/scottybo/textlocal-uk/issues)MITPHPPHP ^7.0

Since Sep 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/scottybo/textlocal-uk)[ Packagist](https://packagist.org/packages/scottybo/textlocal)[ RSS](/packages/scottybo-textlocal/feed)WikiDiscussions master Synced today

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

Laravel Text Local API
======================

[](#laravel-text-local-api)

### Introduction

[](#introduction)

This package allows you to use the TextLocal API in your Laravel 5.5+ app. The core class is a modified version of the demo class provided by TextLocal on:  and uses Guzzle to connect to the API and also provides some additional features not available in the demo class.

### Installation

[](#installation)

**Step 1.** Install the package in one of two ways:

**EITHER** via composer:

```
composer require scottybo/textlocal
```

**OR** by adding the following to your composer.json file and running "composer update"

```
"require": {
    ...
    "scottybo/textlocal": "1.3.*"
}
```

**Step 2.** Add the "TextLocal" facade in your config/app.php file

```
'aliases' => [
    ...
    'TextLocal' => Illuminate\Support\Facades\TextLocal::class,
];
```

**Step 3.** You'll now need to publish the configuration file using the command below. A file will be created: config/textlocal.php

```
php artisan vendor:publish --provider="App\TextLocalApi\TextLocalServiceProvider" --tag="config"
```

**Step 4.** Add your TextLocal credentials to your .env file

**Important** Either specify a Key OR a Hash - don't enter both!

```
TEXTLOCAL_KEY=
TEXTLOCAL_USERNAME=
TEXTLOCAL_HASH=

```

### Example usage

[](#example-usage)

**Important:** View the API docs to see which commands you can use:

In this example we are going to create a command the grab received messages and displays them in the console, using the command **php artisan textlocal:get-received-messages**

```
