Per-user settings repository system for Laravel

Related tags

Laravel Laraconfig
Overview

Xavier von Erlach - Unsplash #ooR1jY2yFr4

Latest Version on Packagist License Coverage Status Laravel Octane Compatible

Laraconfig

Per-user settings repository system for Laravel.

This package allows users to have settings that can be queried, changed and even updated, effortlessly and quickly.

User::find(1)->settings->set('color', 'red');

Requirements

  • Laravel 8.x
  • PHP 8.0 or later

How it works

Laraconfig works extending Laravel relations, and includes a migration system to easily manage them.

Each Setting is just a value, and references a parent "metadata" that contains the information like the type and name, while being linked to a user.

Since Laraconfig uses the Eloquent ORM behind the scenes, getting a one or all settings is totally transparent to the developer.

Quickstart

First, publish and run the migrations. These will add two tables called user_settings and user_settings_metadata. One holds the values per user, the other the metadata of the setting, respectively.

php artisan vendor:publish --provider="DarkGhostHunter\Laraconfig\LaraconfigServiceProvider" --tag="migrations"
php artisan migrate

The migration uses a morph column to connect to the User. You can change it before migrating.

Second, add the HasConfig trait to the User models you want to have settings.

namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use DarkGhostHunter\Laraconfig\HasConfig;

class User extends Authenticatable
{
    use HasConfig;
    
    // ...
}

Finally, use the settings:publish artisan command. This will create a settings folder in the root of your project and a users.php file.

php artisan settings:publish

Now, let's create some settings.

Settings Manifest

Laraconfig makes managing user settings globally using a manifest of sorts, the settings/users.php file. You will see a sample setting already written.

use DarkGhostHunter\Laraconfig\Facades\Setting;

Setting::name('color')->string();

Creating a setting

To create a setting, use the Setting facade. You can start with setting the name, which must be unique, and then declare the type.

use DarkGhostHunter\Laraconfig\Facades\Setting;

Setting::name('dark_mode')->boolean();

Laraconfig is compatible with 7 types of settings, mirroring their PHP native types, along the Collection and Datetime (Carbon) objects.

  • array()
  • boolean()
  • collection()
  • datetime()
  • float()
  • integer()
  • string()

Arrays and Collections are serialized in the database as JSON.

Default value

All settings have a default value of null, but you can use the default() method to set a different initial value.

use DarkGhostHunter\Laraconfig\Facades\Setting;

Setting::name('color')->string()->default('black');

You can later revert the value back to the default using setDefault().

Enabled or Disabled

By default, all settings are enabled by default, but you can change this using disabled().

Setting::name('color')->disabled();

Enabled or disable is presentational; a disabled setting can still be updated. You can programmatically set a value using setIfEnabled().

Group settings

You can set a group name to a setting. This can be handy when you want to display settings in the frontend in an ordered manner by separating them in groups.

Setting::name('color')->group('theme');

Bag

When Laraconfig migrates the new settings, these are created to all models. You can filter a given set of settings through "bags".

By default, all settings are created under the users bag, but you can change the default bag for anything using the bag() method.

Setting::name('color')->group('theme')->bag('style');

Setting::name('notify_email')->boolean()->default(true)->bag('notifications');
Setting::name('notify_sms')->boolean()->default(false)->bag('notifications');

Later, in your model, you can filter the bags you want to work with using filterBags() in your model.

Migrating settings

Once you're done creating your settings, you should use settings:migrate to let Laraconfig add the settings metadata to your database.

php artisan settings:migrate

Behind the scenes, Laraconfig will look into your Models for those using the HasConfig trait, and populate the settings accordingly using the information on the manifest.

Migration run only forward. There is no way to revert a migration once done. On production, removing settings needs confirmation.

Adding new settings

Simply create a new setting and run settings:migrate. Existing settings won't be created again, as Laraconfig will check their existence before doing it.

use DarkGhostHunter\Laraconfig\Facades\Setting;

Setting::name('color')->string()->default('black');

// This new setting will be created 
Setting::name('notifications')->boolean()->default(true);

Removing old settings

To remove old settings, simply remove their declaration and run settings:migrate. Laraconfig compares the settings declared to the ones created in the database, and removes those that no longer exist in the manifest at the end of the migration execution.

string()->default('black'); // This new setting will be created Setting::name('notifications')->boolean()->default(true); ">
use DarkGhostHunter\Laraconfig\Facades\Setting;

// Commenting this line will remove the "color" setting on migration.
// Setting::name('color')->string()->default('black');

// This new setting will be created 
Setting::name('notifications')->boolean()->default(true);

Since this procedure can be dangerous, confirmation will be needed on production environments.

Upgrading settings

You don't need to get directly into the database to update a setting. Instead, just change the setting properties directly in the manifest. Laraconfig will update the metadata accordingly.

Let's say we have a "color" setting we wish to update from a string to an array of colors, with a default and a group.

Setting::name('color')->string()->bag('theme');

// This is the new declaration.
// Setting::name('color')
//    ->array()
//    ->default(['black'])
//    ->group('theme');

Laraconfig will detect the new changes, and update the metadata keeping the users value intact.

// This is the old declaration.
// Setting::name('color')->string()->bag('theme');

Setting::name('color')
    ->array()
    ->default(['black'])
    ->group('theme');

Updating only occurs if the setting is different from before at migration time.

Once done, we can migrate the old setting to the new one using settings:migrate. Users will keep the same setting value they had, but... What if we want to also change the value for each user? We can use the using() method to feed each user setting to a callback that will return the new value.

Setting::name('color')
    ->array()
    ->default('black')
    ->group('theme')
    ->using(fn ($old) => $old->value ?? 'black'); // If the value is null, set it as "black".

The using() method only runs if the setting is different from before at migration time.

Behind the scenes, Laraconfig will look for the "color" setting, update the metadata, and then use a lazy() query to update the value with the callback.

Consider migrating directly on the database if you have hundreds of thousands of records, as this procedure is safer but slower than a direct SQL statement.

Migrating to a new setting

On other occasions, you may want to migrate a setting to a completely new one. In both cases you can use from() to get the old setting value to migrate from, and using() if you want to also update the value of each user.

Taking the same example above, we will migrate the "color" setting to a simple "dark theme" setting.

// This old declaration will be deleted after the migration ends.
// Setting::name('color')->string()->bag('theme');

// This is a new setting.
Setting::name('dark')
    ->boolean()
    ->default(false)
    ->group('theme')
    ->from('color')
    ->using(static fn ($old) => $old->value === 'black'); // If it's black, then it's dark.

The from and using are executed only if the old setting exists at migration time.

Behind the scenes, Laraconfig creates the new "theme" setting first, and then looks for the old "color" setting in the database to translate the old values to the new ones. Since the old setting is not present in the manifest, it will be deleted from the database.

Managing Settings

Laraconfig handles settings like any Eloquent Morph-Many Relationship, but supercharged.

Just simply use the settings property on your model. This property is like your normal Eloquent Collection, so you have access to all its tools.

settings->get('color')}."; ">
$user = User::find(1);

echo "Your color is: {$user->settings->get('color')}.";

Using settings is preferred, as it will load the settings only once.

Initializing

By default, the HasConfig trait will create a new bag of Settings in the database after a User is successfully created through the Eloquent ORM, so you don't have to create any setting.

In case you want to handle initialization manually, you can use the shouldInitializeConfig() method and return false, which can be useful when programmatically initializing the settings.

// app/Models/User.php

/**
 * Check if the user should initialize settings automatically after creation.
 * 
 * @return bool
 */
protected function shouldInitializeConfig(): bool
{
    // Don't initialize the settings if the user is not verified from the start.
    // We will initialize them only once the email is properly verified.
    return null !== $this->email_verified_at;
}

Since the user in the example above won't be initialized, we have to do it manually using initialize().

// Initialize if not initialized before.
$user->config()->initialize();

// Forcefully initialize, even if already initialized.
$user->config()->initialize(true);

Checking settings initialization

You can check if a user configuration has been initialized or not using isInitialized().

if ($user->config()->isInitialized()) {
    return 'You have a config!';
}

Retrieving settings

You can easily get a value of a setting using the name, which makes everything into a single beautiful oneliner.

settings->color}"; ">
return "Your favorite color is {$user->settings->color}";

Since this only supports alphanumeric and underscore characters, you can use value().

settings->value('color')}"; ">
return "Your favorite color is {$user->settings->value('color')}";

You can also get the underlying Setting model using get(). If the setting doesn't exist, it will return null.

value] theme."; ">
$setting = $user->settings->get('theme');

echo "You're using the [$setting->value] theme.";

Since the settings is a collection, you have access to all the goodies, like iteration:

name] has the [$setting->value] value."; } ">
foreach ($user->settings as $setting) {
    echo "The [$setting->name] has the [$setting->value] value.";
}

You can also use the only() method to return a collection of settings by their name, or except() to retrieve all the settings except those issued.

$user->settings->only('colors', 'is_dark');

$user->settings->except('dark_mode');

Grouping settings

Since the list of settings is a collection, you can use groups() method to group them by the name of the group they belong.

$user->settings->groups(); // or ->groupBy('group')

Note that Settings are grouped into the default group by default (no pun intended).

Setting a value

Setting a value can be easily done by issuing the name of the setting and the value.

$user->settings->color = 'red';

Since this only supports settings with names made of alphanumeric and underscores, you can also set a value using the set() method by issuing the name of the setting.

$user->settings->set('color-default', 'red');

Or, you can go the purist mode directly in the model itself.

$setting = $user->settings->get('color');

$setting->value = 'red';
$setting->save();

You can also set multiple settings using an array when using set() in one go, which is useful when dealing with the array returned by a validation.

$user->settings->set([
    'color' => 'red',
    'dark_mode' => false,
]);

When using the cache, any change invalidates the cache immediately and queues up a regeneration before the collection is garbage collected.

That being said, updating the settings directly into the database doesn't regenerate the cache.

Defaulting a Setting

You can turn the setting back to the default value using setDefault() on both the setting instance or using the settings property.

$setting = $user->settings->get('color');

$setting->setDefault();

$user->settings->setDefault('color');

If the setting has no default value, null will be used.

Check if null

Check if a null value is set using isNull() with the name of the setting.

if ($user->settings->isNull('color')) {
    return 'The color setting is not set.';
}

Disabling/Enabling settings

For presentational purposes, all settings are enabled by default. You can enable or disable settings with the enable() and disable(), respectively. To check if the setting is enabled, use the isEnabled() method.

$user->settings->enable('color');

$user->settings->disable('color');

A disabled setting can be still set. If you want to set a value only if it's enabled, use setIfEnabled().

$user->settings->setIfEnabled('color', 'red');

Setting Bags

Laraconfig uses one single bag called default. If you have declared in the manifest different sets of bags, you can make a model to use only a particular set of bags with the filterBags() method, that should return the bag name (or names).

// app/Models/User.php
i

The above will apply a filter to the query when retrieving settings from the database. This makes easy to swap bags when a user has a different role or property, or programmatically.

All settings are created for all models with HasConfig trait, regardless of the bags used by the model.

Disabling the bag filter scope

Laraconfig applies a query filter to exclude the settings not in the model bag. While this eases the development, sometimes you will want to work with the full set of settings available.

There are two ways to disable the bag filter. The first one is relatively easy: simply use the withoutGlobalScope() at query time, which will allow to query all the settings available to the user.

use DarkGhostHunter\Laraconfig\Eloquent\Scopes\FilterBags;

$allSettings = $user->settings()->withoutGlobalScope(FilterBags::class)->get();

If you want a more permanent solution, just simply return an empty array or null when using the filterBags() method in you model, which will disable the scope completely.

/**
 * Returns the bags this model uses for settings.
 *
 * @return array|string
 */
public function filterBags(): array|string|null
{
    return null;
}

Cache

Hitting the database each request to retrieve the user settings can be detrimental if you expect to happen a lot. To avoid this, you can activate a cache which will be regenerated each time a setting changes.

The cache implementation avoids data-races. It will regenerate the cache only for the last data changed, so if two or more processes try to save something into the cache, only the fresher data will be persisted.

Enabling the cache

You can easily enable the cache using the LARACONFIG_CACHE environment variable set to true, and use a non-default cache store (like Redis) with LARACONFIG_STORE.

LARACONFIG_CACHE=true
LARACONFIG_STORE=redis

Alternatively, check the laraconfig.php file to customize the cache TTL and prefix.

Managing the cache

You can forcefully regenerate the cache of a single user using regenerate(). This basically saves the settings present and saves them into the cache.

$user->settings->regenerate();

You can also invalidate the cached settings using invalidate(), which just deletes the entry from the cache.

$user->settings->invalidate();

Finally, you can have a little peace of mind by setting regeneratesOnExit to true, which will regenerate the cache when the settings are garbage collected by the PHP process.

$user->settings->regeneratesOnExit = true;

You can disable automatic regeneration on the config file.

Regenerating the Cache on migration

If the Cache is activated, the migration will invalidate the setting cache for each user after it completes.

Depending on the Cache system, forgetting each cache key can be detrimental. Instead, you can use the --flush-cache command to flush the cache store used by Laraconfig, instead of deleting each key one by one.

php artisan settings:migrate --flush-cache

Since this will delete all the data of the cache, is recommended to use an exclusive cache store for Laraconfig, like a separate Redis database.

Validation

Settings values are casted, but not validated. You should validate in your app every value that you plan to store in a setting.

use App\Models\User;
use Illuminate\Http\Request;

public function store(Request $request, User $user)
{
    $settings = $request->validate([
        'age' => 'required|numeric|min:14|max:100',
        'color' => 'required|string|in:red,green,blue'
    ]);
    
    $user->settings->setIfEnabled($settings);
    
    // ...
}

Testing

Eventually you will land into the problem of creating settings and metadata for each user created. You can easily create Metadata directly into the database before creating a user, unless you have disabled initialization.

public function test_user_has_settings(): void
{
    Metadata::forceCreate([
        'name'    => 'foo',
        'type'    => 'string',
        'default' => 'bar',
        'bag'     => 'users',
        'group'   => 'default',
    ]);
    
    $user = User::create([
        // ...
    ]);
        
    // ...
}

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

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

Comments
  • Issue 21 - migrate command not working

    Issue 21 - migrate command not working

    • ->rtrim('.php') should be changed to ->replace('.php', '') as rtrim destroy the class name if p or h is the last character of class name.
    • Double slash \\ included in the path, should be replaced with single slash \

    Fix to this issue: #21

    @DarkGhostHunter Please accept and merge, as the plugin is unusable without this fix

    opened by eafarooqi 5
  • Unable to locate publishable resources.

    Unable to locate publishable resources.

    Hi,

    when I run command - php artisan vendor:publish --provider="DarkGhostHunter\Laraconfig\LaraconfigServiceProvider" --tag="migrations"

    I get the error: Unable to locate publishable resources. Publishing complete.

    Before the command above i have entered: composer require darkghosthunter/laraconfig

    Am i doing something wrong?

    opened by modrictin 4
  • Still getting the error

    Still getting the error

    When I run php artisan settings:migrate I still get the following error:

    Illuminate\Contracts\Container\BindingResolutionException

    Target [Symfony\Component\Console\Output\OutputInterface] is not instantiable while building [DarkGhostHunter\Laraconfig\Migrator\Pipes\FlushCache, Illum inate\Console\OutputStyle].

    I also tried to reinstall the package.

    I get the same error like before when I try to publish the package with the command php artisan vendor:publish --provider="DarkGhostHunter\Laraconfig\LaraconfigServiceProvider" --tag="migrations"

    ERROR: Unable to locate publishable resources. Publishing complete.

    Also when I run a command php artisan settings:publish

    I get the error:

    There are no commands defined in the "settings" namespace.

    opened by modrictin 2
  • Php artisan settings:publish fails with error

    Php artisan settings:publish fails with error

    Hi,

    it's me again. Sorry to bother you but when I run a command: php artisan settings:publish it fails with an error.

    Error: ** copy(Laravel\settings/users.php): Failed to open stream: No such file or directory **

    I created the directory and file myself so when I run command again it created a symbolic link in laraconfig/stubs/users.php.

    Thanks for everything this library looks awesome!

    opened by modrictin 2
  • Migration of setting does not work

    Migration of setting does not work

    The migration of settings does not work

    I have issued the

    php artisan settings:publish
    

    then

    Setting::name('UserType')->integer();
    

    and then

    php artisan settings:migrate
    

    which fails

    S:\Composer\Laravel\Laraset\vendor\orchestra\testbench-core\laravel\settings/users.phpNo metadata exists in the database, and no declaration exists.
    
    opened by rabol 1
  • Column not found: 1054 Unknown column 'theme' in 'field list'

    Column not found: 1054 Unknown column 'theme' in 'field list'

    When initialising the settings I get this error:

    Column not found: 1054 Unknown column 'theme' in 'field list' (SQL: insert into user_settings (settable_id, settable_type, metadata_id, theme, updated_at, created_at) values (1, App\Models\Company, 1, dark, 2022-02-15 10:01:07, 2022-02-15 10:01:07))

    users.php:

    Setting::name('display_name')->boolean()->default(false);
    
    Setting::name('theme')->array()->default(['theme' => 'dark'])->group('companies')->bag('companies');
    

    Initialization:

    $user = User::first();
        
    $user->company->settings()->initialize();
    
    $user->settings()->initialize();
    

    I'm initialising because I use a seeder to create the models.

    I have migrated the settings and company is another model connected to user model by foreign ID.

    User model:

    namespace App\Models;
    
    use Laravel\Sanctum\HasApiTokens;
    use Illuminate\Notifications\Notifiable;
    use DarkGhostHunter\Laraconfig\HasConfig;
    use Illuminate\Contracts\Auth\MustVerifyEmail;
    use Illuminate\Database\Eloquent\Factories\HasFactory;
    use Illuminate\Foundation\Auth\User as Authenticatable;
    
    class User extends Authenticatable
    {
        use HasApiTokens, HasFactory, Notifiable, HasConfig;
    
        /**
         * The attributes that are mass assignable.
         *
         * @var array<int, string>
         */
        protected $fillable = [
            'name',
            'email',
            'password',
            'company_id'
        ];
    
        /**
         * The attributes that should be hidden for serialization.
         *
         * @var array<int, string>
         */
        protected $hidden = [
            'password',
            'remember_token',
        ];
    
        /**
         * The attributes that should be cast.
         *
         * @var array<string, string>
         */
        protected $casts = [
            'email_verified_at' => 'datetime',
        ];
    
        public function company()
        {
            return $this->belongsTo(Company::class);
        }
    }
    

    Company model:

    namespace App\Models;
    
    use DarkGhostHunter\Laraconfig\HasConfig;
    use Illuminate\Database\Eloquent\Factories\HasFactory;
    use Illuminate\Database\Eloquent\Model;
    
    class Company extends Model
    {
        use HasFactory, HasConfig;
    
        protected $fillable = [
            'name',
        ];
    }
    

    Am I missing something?

    Note: I was able to create user settings but when I added company that's when the error started.

    Versions:

    • "laravel/framework": "^8.75",
    • "darkghosthunter/laraconfig": "^1.3.5",
    opened by BrendanBasson4 0
  • Incorrect settable_type value upon migration

    Incorrect settable_type value upon migration

    Hi,

    I am facing issue that when I run the php artisan settings:migrate command my database gets nicely seeded how ever the models do not include backslashes there for $user->settings does not work.

    However I found out that if I run $user->settings()->initialize() it will recreate all of the settings with proper settable_type including backslashes. Here is a screenshot:

    image

    I am able to solve this issue by editing the fillSettings method in Pipes\CreateNewMetadata.php file like this: image However I am not sure if it is the proper approach.

    Can someone please help me why is this behavior here?

    opened by rudolfbruder 8
  • Test failed, Property does not exist on this collection instance

    Test failed, Property does not exist on this collection instance

    The functionality works perfectly on browser. But it keeps failing on feature test.

    Here is my controller snippet.

    public function update(Request $request)
    {
        $settings = [ 
            'DARK_MODE',
            'SEND_NOTIFICATION_ON_NEW_PROJECT_REQUEST',
            'SEND_NOTIFICATION_ON_NEW_JOB_REQUEST'
        ];
        $user = auth()->user();
        $updatedReq = $request->only($settings);
    
        foreach ($updatedReq as $key => $value) {
            $user->settings->set($key, $value);
        }
    
        return Redirect::back();
    }
    

    Test Snippet

    $response = $this->actingAs($this->creator)
                ->from('/settings')
                ->put('/settings', [
                    'DARK_MODE' => 'LIGHT',
                    'SEND_NOTIFICATION_ON_NEW_PROJECT_REQUEST' => false,
                    'SEND_NOTIFICATION_ON_NEW_JOB_REQUEST' => true,
                ]);
    

    Test Setup

    public function setUp(): void
    {
           parent::setUp();
    
           Metadata::forceCreate([
               'name'    => 'DARK_MODE',
               'type'    => 'string',
               'default' => 'AUTO',
           ]);
           Metadata::forceCreate([
               'name'    => 'SEND_NOTIFICATION_ON_NEW_PROJECT_REQUEST',
               'type'    => 'boolean',
               'default' => true,
           ]);
           Metadata::forceCreate([
               'name'    => 'SEND_NOTIFICATION_ON_NEW_JOB_REQUEST',
               'type'    => 'boolean',
               'default' => true,
           ]);
           $this->creator = User::factory()->create();
           $this->user = User::factory()->create();
    
           $this->creator->assignRole('CREATOR');
    }
    

    I can assure you, all the database seeded and migrated properly. I can do dd($user->settings) and it shows me all 3 items. But when I tried to update it using $user->settings->set($key, $value) on for each, it fails with the error

     Property [DARK_MODE] does not exist on this collection instance.
    
      at D:\Project\_kevinyobeth\SynchV2\vendor\laravel\framework\src\Illuminate\Collections\Traits\EnumeratesValues.php:912
        908▕      */
        909▕     public function __get($key)
        910▕     {
        911▕         if (! in_array($key, static::$proxies)) {
      ➜ 912▕             throw new Exception("Property [{$key}] does not exist on this collection instance.");
        913▕         }
        914▕
        915▕         return new HigherOrderCollectionProxy($this, $key);
        916▕     }
    
      1   D:\Project\_kevinyobeth\SynchV2\vendor\darkghosthunter\laraconfig\src\SettingsCollection.php:326
          DarkGhostHunter\Laraconfig\SettingsCollection::__dynamicGet("DARK_MODE")
    
      2   D:\Project\_kevinyobeth\SynchV2\tests\Feature\SettingsTest.php:68
          DarkGhostHunter\Laraconfig\SettingsCollection::__get("DARK_MODE")
    

    Update 1

    I tried getting the keys from the test, and real browser test, it returns different keys. When I ran this $user->settings->keys() Result ["DARK_MODE","SEND_NOTIFICATION_ON_NEW_PROJECT_REQUEST","SEND_NOTIFICATION_ON_NEW_JOB_REQUEST"]

    While on the test when I ran it, it returns Result [0,1,2]

    My Workaround

    To overcome this problem, I came up with this solution. I search the user setting manually in the controller and it works!

    foreach ($updatedReq as $key => $value) {
        $setting = $user->settings->where('name', $key)->first();     
        $setting->value = $value;
        $setting->save();
    }
    
    opened by KevinYobeth 2
  • JsonException Syntax error when default value is null

    JsonException Syntax error when default value is null

    when we create the settings as follows:

    Setting::name('color')
        ->array()
        ->group('theme');
    

    in this case default value for this setting should be null but in the table user_settings the default value is empty string, which creates as error when try to get the setting

    i have to create the new items like below, otherwise we have error

    Setting::name('color')->array()->default([])->group('theme');
    
    opened by eafarooqi 0
Releases(v1.3.5)
Owner
Italo
Does things. Break things. Does them again.
Italo
A Laravel package that allows you to use multiple ".env" files in a precedent manner. Use ".env" files per domain (multi-tentant)!

Laravel Multi ENVs Use multiple .envs files and have a chain of precedence for the environment variables in these different .envs files. Use the .env

Allyson Silva 48 Dec 29, 2022
A simple package that helps PHP developers to generate the QR code signature as per Zakat authority (ZATCA) requirements of Saudi Arabia.

A PHP package that implements the e-invoice QR code signature requirements as designed by the Zakat authority of Saudi Arabia. How to install? compose

Muktar Sayed Saleh 5 Jun 13, 2022
Auto-generated Interface and Repository file via Repository pattern in Laravel

Auto-generated Repository Pattern in Laravel A repository is a separation between a domain and a persistent layer. The repository provides a collectio

Ngo Dinh Cuong 11 Aug 15, 2022
User authentication REST API with Laravel (Register, Email verification, Login, Logout, Logged user data, Change password, Reset password)

User Authentication API with Laravel This project is a user authentication REST API application that I developed by using Laravel and MySql. Setup Fir

Yusuf Ziya YILDIRIM 3 Aug 23, 2022
Persistent settings in Laravel

Laravel Settings Persistent, application-wide settings for Laravel. Despite the package name, this package works with Laravel 4, 5, 6, 7 and 8! Common

Andreas Lutro 855 Dec 27, 2022
Store and retrieve settings generally or for model objects in Laravel.

Store and retrieve settings generally or for model objects in Laravel. Documentation You can find the detailed documentation here in Laravel Settings

Pharaonic 7 Dec 19, 2022
Add settings to any Laravel model.

Laravel Property Bag Simple settings for Laravel apps. Easily give multiple resources settings Simple to add additional settings as your app grows Set

Zach Leigh 80 Aug 8, 2022
Simple Arabic Laravel Dashboard , has basic settings and a nice layout . to make it easy for you to create fast dashboard

Simple Arabic Laravel Dashboard ✅ Auto Seo ✅ Optimized Notifications With Images ✅ Smart Alerts ✅ Auto Js Validations ✅ Front End Alert ✅ Nice Image V

Peter Tharwat 254 Dec 19, 2022
Model Settings for your Laravel app

Model Settings for your Laravel app The package requires PHP 7.3+ and follows the FIG standards PSR-1, PSR-2, PSR-4 and PSR-12 to ensure a high level

Lorand Gombos 611 Dec 15, 2022
⚙️Simple key/value typed settings for your Laravel app with synchronized json export

Simple key/value typed settings for your Laravel app Create, store and use key/value settings, typed from numbers over dates to array, cached for quic

elipZis 8 Jan 7, 2023
Strongly typed settings for Laravel, includes built-in encryption and friendly validation.

Strongly Typed Laravel Settings Install composer require bogdankharchenko/typed-laravel-settings Model Setup namespace App\Models\User; use Illuminat

Bogdan Kharchenko 10 Aug 31, 2022
Store your Laravel application settings in an on-disk JSON file

Store your Laravel application settings in an on-disk JSON file. This package provides a simple SettingsRepository class that can be used to store you

Ryan Chandler 24 Nov 16, 2022
An interface for the administrator to easily change application settings. Uses Laravel Backpack

Backpack\Settings An interface for the administrator to easily change application settings. Uses Laravel Backpack. Works on Laravel 5.2 to Laravel 8.

Backpack for Laravel 207 Dec 6, 2022
This Laravel Nova settings tool based on env, using nativ nova fields and resources

Nova Settings Description This Laravel Nova settings tool based on env, using nativ nova fields and resources Features Using native Nova resources Ful

Artem Stepanenko 21 Dec 28, 2022
Kalibrant - a package that provides a simple way to manage your models settings

Introduction For your laravel 9.x applications, Kalibrant is a package that provides a simple way to manage your models settings. It is a simple way t

Starfolk 3 Jun 18, 2022
Bootstrap Theme Generator inside of a Wordpress-Settings-Page. Includes live compilation of SCSS!

Bootstrap-Theme-Generator Bootstrap Theme Generator enables you to choose which components of Bootstrap you want to load. It also gives you the possib

null 3 Aug 15, 2022
User to Team associations with invitation system for the Laravel 5 Framework

Teamwork This package supports Laravel 6 and above. Teamwork is the fastest and easiest method to add a User / Team association with Invites to your L

Marcel Pociot 983 Jan 2, 2023
This package helps you to add user based follow system to your model.

Laravel Follow User follow unfollow system for Laravel. Related projects: Like: overtrue/laravel-like Favorite: overtrue/laravel-favorite Subscribe: o

安正超 1k Dec 31, 2022
Login system designed by fragX to validate the user and prevent unauthorized access to confidential data.

Login_System v.0.1 Login system designed by fragX to validate the user and prevent unauthorized access to confidential data. ?? Features Sign In and S

fragX 1 Jan 28, 2022