File: //home/marketing.cfbon.ru/public_html/app/Http/Controllers/Profile/IndexController.php
<?php
namespace App\Http\Controllers\Profile;
use App\Http\Controllers\Controller;
use App\Models\ProfileInfo;
use Illuminate\Http\Request;
use Illuminate\View\View;
class IndexController extends Controller
{
public function index() : View
{
$answers = ProfileInfo::getOption('answers')?->value ?? '';
$socialNetworks = ProfileInfo::getOption('social_networks')?->value ?? '';
return view('profile.index', [
'answers' => $answers,
'socialNetworks' => json_decode($socialNetworks) ?? []
]);
}
}