Download the PHP package geniusts/preferences without Composer

On this page you can find all versions of the php package geniusts/preferences. 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 preferences

Preferences page for Laravel

This package to generate a preferences page to the application, specially if you have many component that have a different settings and you want to store it in the database and use it by default config functions of laravel.

Installation

  1. Download the package

    • command line:

composer require geniusts/preferences

and run: composer update

  1. Service Provider

Note: If you are using Laravel 5.5 or greater no need to add it, It will auto discove

  1. Controller And Migrations

Publish the package Controller file to your application. Run these commands:

php artisan vendor:publish --provider="GeniusTS\Preferences\PreferencesServiceProvider" --tag=controller

You can also publish views and migrations by the following commands:

php artisan vendor:publish --provider="GeniusTS\Preferences\PreferencesServiceProvider" --tag=views
php artisan vendor:publish --provider="GeniusTS\Preferences\PreferencesServiceProvider" --tag=migrations

No need to publish the migrations files just run migrate command to execute the migrations.

php artisan migrate

If you want to use DB transaction while saving the data, add protected $transactions = true; to SettingsController.

  1. Routes and views

Add two routes to you routes file:

Route::get('/settings/{preferences_domain?}', 'SettingsController@edit')
    ->midllware(//Apply your middleware)

Route::patch('/settings/{preferences_domain?}/{preferences_element?}', 'SettingsController@update')
    ->midllware(//Apply your middleware)

Now you have to create a preferences.settings view with your app layout and include the geniusts_preferences::settings view.

@include('geniusts_preferences::settings');

Usage

Creating settings tab

  1. create a view of the settings: Ex.: settings/general.blade.php

  2. Register the tab to PreferencesManager

You can register the domains in the boot function of your package service provider.

Access saved settings

Use the default config function or Config class to get the values of your settings: config('preferences.{domain}.{element}')

Migration from version 1

  1. update inputs name inside preferences views. Ex: You have a general domain that have project_name element, then the input name should be general[project_name].

  2. Update declaration of edit and handleSuccessResponse methods of SettingsController inside your project.

License

This package is free software distributed under the terms of the MIT license.


All versions of preferences with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
illuminate/database Version >=5.2
illuminate/routing Version >=5.2
illuminate/view Version >=5.2
doctrine/dbal Version ^2.5|3.*
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 geniusts/preferences contains the following files

Loading the files please wait ....