Laravel Programming Tutorials, Guides & Best Practices
Explore 51+ expertly crafted laravel tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.
Adblocker Detected
It looks like you're using an adblocker. Our website relies on ads to keep running. Please consider disabling your adblocker to support us and access the content.
Database Driven Settings application settings dynamic settings Laravel configuration Laravel admin interface Laravel helper function Laravel settings table manage application settings Laravel customization. localization dynamic configuration Laravel tutorials. site settings Laravel config Laravel localization dynamic app settings app name timezone language preferences real-time customization.
Tutorial
php
Creating a Configurable Pagination System in Laravel
- If no database setting is found, the default value of
10is used.
Use the same approach for product listings or user lists:
Nov 16, 2024
Read More Tutorial
php
Using Laravel Config and Localization Based on Site Settings
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class SiteSettingsSeeder extends Seeder
{
public function run()
{
DB::table('site_settings')->insert([
['key' => 'app_name', 'value' => 'My Laravel App'],
['key' => 'app_timezone', 'value' => 'UTC'],
['key' => 'app_language', 'value' => 'en'],
]);
}
} php artisan db:seed --class=SiteSettingsSeederNov 16, 2024
Read More Tutorial
php
How to Dynamically Manage Application Settings in Laravel
Create resources/views/admin/settings/edit.blade.php:
<form action="{{ route('admin.settings.update') }}" method="POST">
@csrf
@method('PUT')
@foreach ($settings as $setting)
<div>
<label>{{ ucfirst(str_replace('_', ' ', $setting->key)) }}</label>
<input type="text" name="settings[{{ $setting->key }}]" value="{{ $setting->value }}">
</div>
@endforeach
<button type="submit">Save Settings</button>
</form>Nov 16, 2024
Read More