shawnsandy / extras
Laravel descriptions
Installs: 219
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 3
Language:HTML
Requires
- php: ~5.6|~7.0
- abraham/twitteroauth: ^0.7.2
- albertcht/invisible-recaptcha: ^1.4
- barryvdh/laravel-debugbar: ^2.3
- barryvdh/laravel-ide-helper: ^2.3
- brotzka/laravel-dotenv-editor: ^2.0
- davestewart/sketchpad: ^1.2
- doctrine/dbal: ^2.5
- greggilbert/recaptcha: ^2.2
- illuminate/contracts: ~5.3|~5.4
- illuminate/http: ~5.3|~5.4
- illuminate/support: ~5.3|~5.4
- laracasts/flash: ^2.0
- laracasts/generators: ^1.1
- laracasts/utilities: ^2.1
- laravel/socialite: ^3.0
- laravelcollective/html: ^5.4.0||^5.3.1
- laravelcollective/remote: ^5.4.0||^5.3.1
- league/glide-laravel: ^1.0
- mews/purifier: ^2.0
- rap2hpoutre/laravel-log-viewer: ^0.9.0
- thujohn/twitter: ^2.2
- zondicons/blade-bridge: ^0.1.3
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-11-26 11:21:03 UTC
README
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
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
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 <img src="path/to/image?w=400 ?>
// 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_
{{ Html::materialIcon("material-add-circle") }
{{ Html::entypoIcon("entypo-adjust") }}
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
// $ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email shawnsandy04@gmail.com instead of using the issue tracker.
Credits
- Shawn Sandy
- [All Contributors][link-contributors]
License
The MIT License (MIT). Please see License File for more information.