I have written below code
$setting = Setting::where('id', 1)->first();
return view('posts.setting', compact('setting'));
When I use this variable in my index,
<?php $setting = isset($_POST['setting']) ? $_POST['setting'] : 'NULL'; ?>
<?php print_r($setting); ?>
I am getting NULL. Why is my query not generating any output?
$settingin your blade file?1?dd($setting)beforeview(.....)and check what you get.