Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davide-casiraghi/laravel-jumbotron-images
Add a jumbotron images with title and description to your pages. The titles and descriptions support multilanguage.
https://github.com/davide-casiraghi/laravel-jumbotron-images
jumbotron laravel
Last synced: 14 days ago
JSON representation
Add a jumbotron images with title and description to your pages. The titles and descriptions support multilanguage.
- Host: GitHub
- URL: https://github.com/davide-casiraghi/laravel-jumbotron-images
- Owner: davide-casiraghi
- License: mit
- Created: 2019-04-25T08:52:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-21T16:01:06.000Z (almost 5 years ago)
- Last Synced: 2024-11-06T21:16:46.801Z (2 months ago)
- Topics: jumbotron, laravel
- Language: PHP
- Size: 221 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Jumbotron Images
[![Latest Version on Packagist](https://img.shields.io/packagist/v/davide-casiraghi/laravel-jumbotron-images.svg?style=flat-square)](https://packagist.org/packages/davide-casiraghi/laravel-jumbotron-images)
[![Build Status](https://img.shields.io/travis/davide-casiraghi/laravel-jumbotron-images/master.svg?style=flat-square)](https://travis-ci.org/davide-casiraghi/laravel-jumbotron-images)
[![Quality Score](https://img.shields.io/scrutinizer/g/davide-casiraghi/laravel-jumbotron-images.svg?style=flat-square)](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-jumbotron-images)
[![Coverage Status](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-jumbotron-images/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-jumbotron-images/)
[![GitHub last commit](https://img.shields.io/github/last-commit/davide-casiraghi/laravel-jumbotron-images.svg)](https://github.com/davide-casiraghi/laravel-jumbotron-images)Add a jumbotron images with title and description to the pages of your Laravel application.
The titles and descriptions support multilanguage.## Installation
You can install the package via composer:
```bash
composer require davide-casiraghi/laravel-jumbotron-images
```### Publish all the vendor files
```php artisan vendor:publish --force```### Run the database migrations
```php artisan migrate```### Add the JS files to /resources/js/app.js
```
require('./vendor/laravel-jumbotron-images/jquery.stellar');
require('./vendor/laravel-jumbotron-images/laravel-jumbotron-images');
```### Add the SCSS file to /resources/sass/app.scss
```
@import 'vendor/laravel-jumbotron-images/laravel-jumbotron-images';
```
### Add your jumbotrons to the jumbotrons table
Once you have published the package you can go to this route to manage your jumbotrons:
**/jumbotron-images**## Usage
Include the facade in your controller:
``` php
use DavideCasiraghi\LaravelJumbotronImages\Facades\LaravelJumbotronImages;
```In the controller, pass to the view the Jumbotron datas. (In this case we want to show the jumbotron with id = 1)
``` php
$jumbotronImage = LaravelJumbotronImages::getJumbotronImage(1);
return view('welcome', [
'jumbotronImage' => $jumbotronImage,
'jumbotronImageParameters' => LaravelJumbotronImages::getParametersArray($jumbotronImage),
]);
```Then include in the view the jumbotron view.
``` php
@include('vendor.laravel-jumbotron-images.show-jumbotron-image', $jumbotronImage)
```### The snippet
The library replace all the occurrences of this kind of snippet``` bash
{# jumbotron id=[1] #}
```
## TestingYou can run unit tests checking the code coverage using this command.
``` bash
./vendor/bin/phpunit --coverage-html=html
```
So you can find the reports about the code coverage in this file **/html/index.html**## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [Davide Casiraghi](https://github.com/davide-casiraghi)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
## Laravel Package Boilerplate
This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).