artisticre
3 months ago
965
25
Laravel

String back to checked Checkbox

Posted 3 months ago by artisticre

I have a checkbox that has 15 options that is writing the checked options as a string in the database. I want to know how to take that string and display it back as checked checkboxes on the show view. The field I am trying to have as checkboxes is teampapp.teamexperience. I don't know where to start...

This is my function to the show page

$team= DB::table('users')
            ->join('profile', 'profile.user_id', '=', 'users.id')
            ->leftJoin('teamapp', 'teamapp.user_id', '=' ,'users.id')
            ->select(
                '*'
                )
                ->where('teamapp.id', '=', $id)
                ->get();
                return view('teamapplication.show', compact('team'));

Please sign in or create an account to participate in this conversation.