Download the PHP package utyemma/larasetting without Composer

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

LaraSettings

Description

LaraSettings is a Laravel package that simplifies the management of application settings. It provides a structured and extensible way to define, retrieve, and update settings stored in the database. It includes useful commands for generating and seeding settings classes, making it easy to customize for various use cases.


Table of Contents

  1. Requirements
  2. Installation
  3. Usage
    • Defining a Settings Class
    • Seeding Settings
    • Retrieving and Updating Settings
    • Strict Mode
  4. Contributing
  5. Maintainers
  6. License

Requirements


Installation

  1. Install the package via Composer:

  2. Publish the migration file:

  3. Run the migrations to create the settings table:

Usage

Defining a Settings Class

Use the make:setting command to create a new settings class:

This will generate a new settings class in the App\Settings namespace. Define your options, labels, and casts within the class to tailor it to your application's needs.

Seeding Settings

To seed settings into the database, use the settings:seed command:

Replace ExampleSettings with the name of your settings class. This will populate the database with the default attributes and values defined in the class.

Retrieving and Updating Settings

You can interact with settings using dynamic property access or methods:

Retrieving a Setting

Updating a Setting

Bulk Updating Settings

Fetching All Settings

Strict Mode

LaraSettings operates in strict mode by default. Strict mode ensures that only settings defined in the options array of a settings class can be updated or created. This prevents accidental changes to undefined settings. When enabled, attempting to update an undefined setting will throw an exception. Ensure that all valid keys are listed in the options array of your settings class.

Disabling Strict Mode

If you want to allow dynamic creation of settings that are not predefined in the options array, you can set the $strict property to false in your settings class:


Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a feature branch.
  3. Submit a pull request.

Maintainers


License

This package is open-sourced software licensed under the MIT license.


All versions of larasetting with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
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 utyemma/larasetting contains the following files

Loading the files please wait ...