DeveloperBreeze

Laravel Customization. Development Tutorials, Guides & Insights

Unlock 1+ expert-curated laravel customization. tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your laravel customization. skills on DeveloperBreeze.

Tutorial
php

How to Dynamically Manage Application Settings in Laravel

   namespace Database\Seeders;

   use Illuminate\Database\Seeder;
   use Illuminate\Support\Facades\DB;

   class SettingsSeeder extends Seeder
   {
       public function run()
       {
           DB::table('settings')->insert([
               ['key' => 'timezone', 'value' => 'UTC'],
               ['key' => 'notifications_enabled', 'value' => 'true'],
               ['key' => 'api_rate_limit', 'value' => '100'],
           ]);
       }
   }
   php artisan db:seed --class=SettingsSeeder

Nov 16, 2024
Read More