title: Select and update table columns without ID in laravel
body: <p>I'm trying to make page in admin panel from where the admin can change site settings such as: <code>site title</code>, <code>default country</code> etc. </p>
  
  <p>I've created table in database called <code>settings</code> without ID because I don't really need it. It will be only one row which will be updated. No inserts of new rows. </p>
  
  <p>I have add this lines in my route.php</p>
  
  <pre><code>Route::get('settings', 'SettingsController@index')-&gt;name('admin.settings');
  Route::post('settings/update', 'SettingsController@update')-&gt;name('admin.settings.update');
  </code></pre>
  
  <p>This is my update function in SettingsController.php</p>
  
  <pre><code>public function index()
  {
      $settings = Settings::all();
      return view('backend.settings',compact('settings'));
  }
  public function update( Request $request)
  {
  
      $settings-&gt;settings_site_title = $request['site_title'];
      $settings-&gt;settings_item_per_page = $request['item_per_page'];
      $settings-&gt;settings_default_country = $request['default_country'];
      $settings-&gt;settings_max_image_post = $request['max_image_post'];
      $settings-&gt;save();
  
      return redirect()-&gt;route('admin.settings')-&gt;with('alert-success', ' Success');
  }
  </code></pre>
  
  <p>and the form</p>
  
  <pre><code> @foreach ($settings as $preferences)
       {!! Form::open(['route' =&gt; 'admin.settings.update','files' =&gt; true , 'class' =&gt;'form-horizontal']) !!}
  
                &lt;div class="form-group"&gt;
                   {!! Form::label('site_title', 'Site Name', array('class'=&gt; 'col-sm-2 control-label')) !!}
                    &lt;div class="col-sm-10"&gt;
                     {!! Form::text('site_title', $preferences-&gt;settings_site_title, ['class'=&gt;'form-control', 'placeholder'=&gt;'Enter site name', 'id'=&gt;'site_title']) !!}
                    &lt;/div&gt;
                  &lt;/div&gt;
  
        ... some more inputs like ^
  
       {!! Form::close() !!}
   @endforeach
  </code></pre>
  
  <p>When I submit the form I've got this error:</p>
  
  <blockquote>
    <p>Creating default object from empty value</p>
  </blockquote>
  
  <p>Update: Model</p>
  
  <pre><code>class Settings extends Model
  {
      protected $table = 'settings';
      public $timestamps = false;
  
      protected $fillable = [
          'settings_site_title',
          'settings_item_per_page',
          'settings_default_country',
          'settings_max_image_post',
      ];
  
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>public function update( Request $request)
  {
      $settings = Settings::first(); //missed line
      $settings-&gt;settings_site_title = $request['site_title'];
      $settings-&gt;settings_item_per_page = $request['item_per_page'];
      $settings-&gt;settings_default_country = $request['default_country'];
      $settings-&gt;settings_max_image_post = $request['max_image_post'];
      $settings-&gt;save();
  
      return redirect()-&gt;route('admin.settings')-&gt;with('alert-success', ' Success');
  }
  </code></pre>