dimanche 12 juin 2016

Error storing Topic Model into the database using Sentinel

I have a small forum, im trying to create topic and replies for the store method.

public function store()
{
    $this->request->user()->topics()->create([
        'board_id' => $this->request->id,
        'title' => $this->request->title,
        'body' => $this->request->body
    ]);
    return redirect(url('/board/' . $this->request->id));
}

I am receiving this error.

Call to a member function topics() on null

Also note, i am using Sentinel http://ift.tt/MSeZd7 from this repo.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire