ErrorException (E_UNKNOWN)
Trying to get property of non-object (View: C:\xampp\htdocs\wys\wys\app\views\index\index.blade.php)
http://Illuminate\View\Engines\CompilerEngine handleViewException
…\bootstrap\compiled.php9881
error code is,
$this->handleViewException($e, $obLevel);
Controller.php
public function editnewsandevents($neid) { $newsevents = ForumNewsevent::find($neid);
return View::make('editnewsandevents.editnewsandevents')
->with('newsevents',$newsevents);
}
public function update() {
$validation = Validator::make(Input::all(), array(
'neh'=>'required|min:2',
'neb'=>'required|min:5',
)
);
if($validation->fails()) {
return Redirect::back()->withInput()
->withErrors($validation);
} else {
$user = Auth:: ForumNewsevent()->neid;
//$newsevents = Input::get('neid');
$nheader = Input::get('neh');
$nbody= Input::get('neb');
ForumNewsevent::where('neid', $user)
->update(array(
'nheader' => $nheader,
'nbody' => $nbody
));
return Redirect::route('addnewsandevents')->with
('success','you updated sucessfully.');
}
how to solve this problem?
$user = Auth:: ForumNewsevent()->neid;// in this code
in routes.php page im using not Auth ...its prefix/editnewsandevents. i think this line of codes are wrong
can you correct this codes