Alright so i was using a session earlier and encountered a weird "bug"?
so here is my original code that should had worked?
$tid = Session::get('tid');
$ticket = TicketUpdate::create(array(
'tid' => $tid,
'uid' => Auth::user()->id,
'message' => $reply
));
I would get the error that "tid" was null, but simply adding this second line it works fine:
$tid = Session::get('tid');
$tid_value = $tid; //<--- here
$ticket = TicketUpdate::create(array(
'tid' => $tid_value,
'uid' => Auth::user()->id,
'message' => $reply
));
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community