Skip to content

how to added another attribute to groupe $Data #16

Description

@mehdithemaker

Hello how can I add another attribute to the array $data when creating a groupe I tryed :
but it's not working

[public function store(Request $request){
$userId=Auth::User()->id;

    $filiereid = $request->input('filiere');

    $data= [
    'name'              => $request->input('groupename'),
    'description'       => '', // optional
    'short_description' => '', // optional
    'filiere_id'        => $filiereid,

    'image'             => '', // optional
    'private'           => 0,  // 0 (public) or 1 (private)
    'extra_info'        => '', // optional
    'settings'          => '', // optional
    'conversation_id'   => 0,  // optional if you want to add messaging to your groups this can be useful
    ];
    $group = Groups::create($userId, $data);

    return view('/home');](url)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions