Working on comment to make as solution and I have this...
`public function markAsSolution() {
$solutionId=Input::get('solutionId');
$threadId=Input::get('threadId');
$thread=Thread::find($threadId);
$thread->solution=$solutionId;
if($thread->save()){
return back()->withMessage('Marked as solution');
}
}`
As use Illuminate\Support\Facades\Input;
is not available on laravel latest version how should I handle this...
You have to use the Request Facade or request helper to get those. It can be done like Request::get()
or request()->get()
import Illuminate\Http\Request
at the top to use facade
In your case use this
$solutionId=request()->get('solutionId');
$threadId=request()->get('threadId');
$thread=Thread::find($threadId);
$thread->solution=$solutionId;
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community