hello to all, I am new in laravel framework : I am creating admin panel ...when user update her/his profile its userid read by update controller method using route name update.And update controller method return view updatedata along with array.I amusing ORM DATABASE
My controller method[update] file is
 

    public function update($id)
      {
        $records = Register::find($id);
       return view('updatedata',['records' => $records]);  
      }
My updatedata.blade.php file is

    @extends('layout/master')
    @section('content')
    <h1 align="center">
    
    @foreach($records as $records)
    {!!  Form::open(['route'=>'f.update'])   !!}
    <table border="2" align="center">
      <tr>
         <td>{!! Form::label('name','Name') !!}</td>
           <td>{!!  Form::text('name',$records->name) !!}</td>
        </tr>
        <tr>
           <td>{!!Form::label('phone','Phone')!!}</td>
           <td>{!! Form::text('phone',$records->phone) !!}</td>
        </tr>
        <tr>
           <td>{!! Form::label('email','E-mail') !!}</td>
           <td>{!! Form::email('email',$records->name) !!}</td>
        </tr>
        <tr>
           <td>{!! Form::label('course','Course') !!}</td>
           <td>{!! Form::select('course',['MCA'=>'MCA','BTECH'=>'BTECH','BCA'=>'BCA'],$records->course)                                               !!}</td>
        </tr>
        <tr>
           <td>{!! Form::label('address','Address') !!}</td>
           <td>{!! Form::textarea('address', $records->address, ['size' => '30x3']) !!}</td>
        </tr>
        <tr>
          <td colspan="2">
            {!! Form::hidden('id',$records->id) !!}
          </td>
        </tr>
        <tr>
           <td colspan="2" align="center">{!!  Form::submit() !!}</td>
        </tr>
    
    </table>
    
    {!!  Form::close()                                    !!}
    @endforeach 
    </h1>
    @endsection


The error is 

    2/2
    ErrorException in 4de1c6468785010f583b37a90fa7bed16c4e92a7.php line 10:
    Trying to get property of non-object (View: C:\xampp\htdocs\laravel\resources\views\updatedata.blade.php)