tal7aouy/settings

create your own settings for app

v1.0.0 2021-11-20 23:52 UTC

This package is auto-updated.

Last update: 2024-11-21 06:43:05 UTC


README

Any web application’s backend needs to have some sort of a settings from where you can change the various settings of your application.

for example you have an e-commerce app, you would like to have some settings such as site name, logos, shipping methods control, payment methods control ...

Usage

Installation

    composer require tal7aouy/settings
  • we will add a database seed for our settings table. Run below command in the terminal.
php artisan make:seed SettingsTableSeeder

here you can add all settings that you want for you application. 👇

Screenshot - Seeder

call your SettingsTableSeeder in DatabaseSeeder class

Screenshot - Seeder

now is the final step, run these commands to migrate settings table and Seed the database with records.

php artisan migrate
// then
php artisan db:seed

use settings

        // site name
     {{Config::get('settings.site_name')}}
     //or 
     {{Config('settings.site_name')}}
     

License

Laravel Settings is an open-sourced software licensed under the MIT LICENSE