PHPackages                             shawnsandy/extras - 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. shawnsandy/extras

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

shawnsandy/extras
=================

Laravel descriptions

v0.1.34(8y ago)0219[3 issues](https://github.com/shawnsandy/extras/issues)2MITHTMLPHP ~5.6|~7.0

Since Mar 31Pushed 8y ago1 watchersCompare

[ Source](https://github.com/shawnsandy/extras)[ Packagist](https://packagist.org/packages/shawnsandy/extras)[ Docs](https://github.com/shawnsandy/extras)[ RSS](/packages/shawnsandy-extras/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (25)Versions (21)Used By (2)

Laravel Extras (Beta)
=====================

[](#laravel-extras-beta)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ea21e54bd3e635029c60665f277d74477f54f977256231ffd5038b08bba88ec8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736861776e73616e64792f6578747261732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shawnsandy/extras)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/b8b517f831c1c06ecdf15b2bbde8f99bdea49512194bf1ca0eb6a31dbb285fdf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736861776e73616e64792f6578747261732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shawnsandy/extras)

Extras is small Laravel package that contains some basic components (functions) that are usually required for most apps but are not necessarily included in the base Laravel install.

- Social Login
- Messaging (mail)
- Maps (google)
- Glide for Dynamic images
- Components (login, register, alerts, contact...)

**Coming Soon**

- Toastr alerts
- Notifications
- Push notifications
- Backups

### [Read the docs](/docs)

[](#read-the-docs)

Install
-------

[](#install)

Via Composer

```
$ composer require shawnsandy/extras dev-master

```

**Laravel 5.4 and below**

```
$ composer require shawnsandy/extras

```

**Required packages**

```
composer require zondicons/blade-bridge thujohn/twitter spatie/laravel-collection-macros rap2hpoutre/laravel-log-viewer plank/laravel-mediable mews/purifier league/glide-laravel laravelcollective/remote laravelcollective/html laravel/socialite laracasts/utilities laracasts/generators laracasts/flash illuminate/support illuminate/http illuminate/contracts greggilbert/recaptcha doctrine/dbal brotzka/laravel-dotenv-editor barryvdh/laravel-ide-helper albertcht/invisible-recaptcha abraham/twitteroauth

```

Open `config\app.php` and add the following

- **Providers array**

The Laravel discover package feature or the Extras service provider auto loads the required providers / Facade for the following package in one go.

- 'davestewart\\sketchpad\\SketchpadServiceProvider'
- 'Collective\\Remote\\RemoteServiceProvider'
- 'Collective\\Html\\HtmlServiceProvider'
- 'Mews\\Purifier\\PurifierServiceProvider'
- 'Thujohn\\Twitter\\TwitterServiceProvider'
- 'Brotzka\\DotenvEditor\\DotenvEditorServiceProvider'
- 'Laravel\\Socialite\\SocialiteServiceProvider'
- ...

```
'providers' => [
ShawnSandy\Extras\ExtrasServiceProvider::class,
]
```

or load them on you lonesome `:(`

```
'providers' => [

    ShawnSandy\Extras\ExtrasProvider::class,
    // --- packages -----
    Thujohn\Twitter\TwitterServiceProvider::class,
    Collective\Html\HtmlServiceProvider::class,
    davestewart\sketchpad\SketchpadServiceProvider'
    Collective\Remote\RemoteServiceProvider'
    Collective\Html\HtmlServiceProvider'
    Mews\Purifier\PurifierServiceProvider'
    Thujohn\Twitter\TwitterServiceProvider'
    Brotzka\DotenvEditor\DotenvEditorServiceProvider'
    Laravel\Socialite\SocialiteServiceProvider'

    // ###
]
```

- **Aliases array**

```
    'aliases' => [

    'Form' => Collective\Html\FormFacade::class,
    'Html' => Collective\Html\HtmlFacade::class,
    'Extras' => \ShawnSandy\Extras\ExtrasFacade::class,
    'Gmap' => \ShawnSandy\Extras\Apps\Maps\MapsFacade::class,
    "Twitter" => \Thujohn\Twitter\Facades\Twitter::class,

   // ###
    ]
```

**Routes**

```
Route::group(['prefix' => "extras"], function () {
    Extras::routes();
});
```

Usage
-----

[](#usage)

**Custom Error Pages**

```
  if (env("APP_DEBUG") == false && env("APP_ENV") === "production"):

            return app(SystemErrors::class)->renderErrors($request, $exception);

  endif;
```

**GMAPS (google maps) component**

```
{{ Html::extrasMap(
    "1600 Pennsylvania Ave NW, Washington, DC 20500", //address
    ["height" => '680px'], // inline style
    ['zoom' => 17, 'scroll' => 'true' ] // options map-zoom / scroll
    )
    }}
```

**Socialite SignIn**

```
 {{ Html::networkLogin(

     "Connect Via Social Media",  // title
     ["facebook", "twitter"] // providers (facebook, twitter, linkedin, github)

     ) }}
```

**Laravel login component** displays a login form

```
{{ Html::extrasLogin("Login Title Here") }}
```

**Dynamic Images with Glide**

Output the full path to your image `
