Download the PHP package hannoma/larapolls without Composer

On this page you can find all versions of the php package hannoma/larapolls. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package larapolls

Larapolls

Laravel package for displaying, creating and managing polls with permissions!


Demo

In use


Installation

You can install the package via composer:

In Laravel 5.5 the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php file:

You can publish the package files with:

Because this package uses spatie/laravel-permission for the permissions, you should publish the migration files of that package too:

After the migration has been published you can create the poll and permission-tables by running the migrations:

Configuration

All important configuration options can be found in the config/larapolls.php file:

NOTE: The permissions defined in the standard_permissions array are added to the role larapolls_standard when you first access the home route of Larapolls. If you want to add or remove permissions from this role later on, do this:

Or you can remove the role for some users:

Localization

After publishing the vendor files of this package, you can find the localization files in resources/lang/vendor/larapolls/. Supported languages by this package are:

If you want to add your locale, create the folder resources/lang/vendor/larapolls/YOUR LOCALE/. Then just copy the larapolls.php localization file of another locale and translate the strings. If you add your locale, I would be very thankful if you create a pull request with your locale ^^

Views

This package was created and designed with Bootstrap version 4.x, but gives you the option to use Bootstrap version 3.x instead. Therefor you need to change the value bootstrap_v4 to false in the config/larapolls.php file. The templates for Bootstrap version 4.x are called *_v4.blade.php, the templates for version 3.x *_v3.blade.php. NOTE: Because the package was created with version 4.x, the view files for version 3.x contain the same code as the view files for version 4! So you need to change some things in order that they work with version 3.x!

Personalizing

After publishing the package vendor files, you can find the blade templates in resources/views/vendor/larapolls/. All your changes in these files will be displayed on your site. NOTE: DO NOT change any if conditions or other blade commands otherwise this package may not work anymore!

Usage

First, add the Spatie\Permission\Traits\HasRoles trait to your User model(s). Please use the user model App\User, because otherwise there will be errors using Larapolls:

Permission Setup

This package comes with artisan commands to setup permissions for different roles and categories. Just run php artisan larapolls:setup_roles and use these options:

Displaying Polls

All polls are displayed on the larapolls.home route.

You can display polls of a category with the larapolls.category route which takes the parameter category.

You can also display a poll with a given id on any page with:

If you use this command, make sure that you import the Font Awesome version 5.x in your page.

If you have categories that shall be only accessed by admins or users with permission, add your category in the protectedCategories array in the config file and give the users that you want to access this category the appertaining permission:

If you have not create this permission before, you may want to do this:


All versions of larapolls with dependencies

PHP Build Version
Package Version
Requires spatie/laravel-permission Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hannoma/larapolls contains the following files

Loading the files please wait ....