Premium Component
This is a premium Content. Upgrade to access the content and more premium features.
Upgrade to PremiumDeveloperBreeze
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.
This is a premium Content. Upgrade to access the content and more premium features.
Upgrade to PremiumMore content you might like
Use Laravel’s sanitize middleware or manually clean inputs before storing or displaying:
use Illuminate\Support\Str;
$cleanInput = Str::clean($request->input('content')); {
"data": [
{ "id": 1, "title": "Post 1" },
{ "id": 2, "title": "Post 2" }
],
"meta": {
"current_page": 1,
"per_page": 10,
"total": 50,
"last_page": 5
},
"links": {
"next": "http://example.com/api/posts?page=2",
"previous": null
}
} 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' => 'sidebar_visible', 'value' => 'true'],
['key' => 'featured_products_widget', 'value' => 'true'],
['key' => 'recent_posts_widget', 'value' => 'false'],
]);
}
} php artisan db:seed --class=SiteSettingsSeederUse the shared data in any Blade template:
<p>Current Theme: {{ $globalData['app_theme'] }}</p>
<p>API Limit: {{ $globalData['api_limit'] }}</p>Please sign in to join the discussion.
No comments yet. Be the first to share your thoughts!