2017 © Pedro Peláez
 

library extras

Laravel descriptions

image

shawnsandy/extras

Laravel descriptions

  • Thursday, September 7, 2017
  • by shawnsandy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 195 Installations
  • HTML
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 21 Versions
  • 1 % Grown

The README.md

Laravel Extras (Beta)

Latest Version on Packagist ![Software License][ico-license] ![Total Downloads][ico-downloads], (*1)

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., (*2)

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

Coming Soon, (*3)

  • Toastr alerts
  • Notifications
  • Push notifications
  • Backups

Read the docs

Install

Via Composer, (*4)


$ composer require shawnsandy/extras dev-master

Laravel 5.4 and below, (*5)


$ composer require shawnsandy/extras

Required packages, (*6)

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, (*7)

  • 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., (*8)

  • '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 :(, (*9)


'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

``` php 'aliases' => [, (*10)

'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,

// ### ], (*11)


__Routes__ ```php Route::group(['prefix' => "extras"], function () { Extras::routes(); }); ````` ## Usage __Custom Error Pages__ ``` php if (env("APP_DEBUG") == false && env("APP_ENV") === "production"): return app(SystemErrors::class)->renderErrors($request, $exception); endif;

GMAPS (google maps) component, (*12)

``` php, (*13)

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


__Socialite SignIn__ ``` php {{ Html::networkLogin( "Connect Via Social Media", // title ["facebook", "twitter"] // providers (facebook, twitter, linkedin, github) ) }} ``` __Laravel login component__ displays a login form ``` php {{ Html::extrasLogin("Login Title Here") }} ``` __Dynamic Images with Glide__ Output the full path to your image `<img src="path/to/image?w=400 ?>` ``` php // from public/img {{ Html::extrasImg("bg/01.jpg?w=500", ["class" => "img-circle", "alt" => "Glide image"]) }} // from your storage directory {{ Html::extrasImg("photo1.jpg?w=500", ["class" => "img-responsive", "alt" => "Glide image"], "/extras/img/") }} ``` __SVG ICONS___ [Material Icons](https://material.io/icons/) ``` php {{ Html::materialIcon("material-add-circle") }

Entypo Icons, (*15)

``` php, (*16)

{{ Html::entypoIcon("entypo-adjust") }}, (*17)



## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. ## Testing ``` bash // $ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*18)

Security

If you discover any security related issues, please email shawnsandy04@gmail.com instead of using the issue tracker., (*19)

Credits

License

The MIT License (MIT). Please see License File for more information., (*20)

The Versions