Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to added another attribute to groupe $Data #16

Open
mehdithemaker opened this issue May 26, 2019 · 3 comments
Open

how to added another attribute to groupe $Data #16

mehdithemaker opened this issue May 26, 2019 · 3 comments

Comments

@mehdithemaker
Copy link

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)
@musonza
Copy link
Owner

musonza commented Jun 1, 2019

can you show your function? Are all the other attributes showing?

@markoman78
Copy link

Check Vendor->musonza->groups->src->Models->Group.php and modify $fillable.

I don't know other way to solve this so I had to make changes to source code.

@musonza
Copy link
Owner

musonza commented Jul 7, 2019

You could add a json blob to extra_info column

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants