davide-casiraghi/laravel-columns

A Laravel library to generate responsive columns with multi language contents.

1.0.1 2020-01-21 13:27 UTC

This package is auto-updated.

Last update: 2024-04-22 01:03:27 UTC


README

Latest Version on Packagist Build Status StyleCI Quality Score Coverage Status 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f33356438633436623136343163643262366265632f6d61696e7461696e6162696c697479 GitHub last commit

A Laravel library to generate responsive columns with multi language contents.

The library replace all the occurances of this snippet

{# column_group column_group_id=[1] #}

With the some HTML code of the relative column group. This code uses bootstrap 4.

Installation

You can install the package via composer:

composer require davide-casiraghi/laravel-columns

Publish all the vendor files

php artisan vendor:publish --force

Run the database migrations

php artisan migrate

Install Press.css npm package for the buttons style

npm install press-css
https://github.com/codyogden/press-css

Import the scss files

Add this lines to your resources/sass/app.scss file:

@import "~press-css/css/press.css";
@import 'vendor/laravel-columns/columns';

and then run in console:
npm run dev

Usage

Authorization

To work the package aspect that in your user model and table you have a field called group that can have this possible values:

  • null: Registered user
  • 1: Super Admin
  • 2: Admin

Just the users that have Admin and Super admin privileges can access to the routes that allow to create, edit and delete the blogs, categories and posts. Otherwise you get redirected to the homepage.

Access to the package

After the package is published this new routes will be available:

  • /columnGroups
  • /columns

Accessing to this routes you can manage new column groups and columns.

Replace the snippet occurrances

Then to replace all the occurrance of the column group snippets:

use DavideCasiraghi\LaravelColumns\Facades\LaravelColumns;  

$text = LaravelColumns::replace_column_group_snippets_with_template($text);

Testing

./vendor/bin/phpunit --coverage-html=html

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email davide.casiraghi@gmail.com instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.