title: Default value for a photo in laravel
body: <p>Hi i'm trying to make a function that allows everyone to publish whatever they want but when the visitor is not a user his post photo's default will be a photo from my directory storage that holds the meaning of anonymous or something alike: </p>
  
  <p>what is the SQL command line that allows me to do so?</p>
  
  <p>My post migration table is:</p>
  
  <pre><code>   Schema::create('posts', function (Blueprint $table) {
          $table-&gt;increments('id');
           $table-&gt;string('title');
            $table-&gt;string('username');
           $table-&gt;string('body');
           $table-&gt;boolean('valid')-&gt;default(0);
            $table-&gt;string('photo',150)-&gt;nullable();
              $table-&gt;timestamps();
      });
  </code></pre>
  
  <p>My function store() is the following:</p>
  
  <pre><code>  public function store(Request $request)
      {
  
     $post= new Post();
     $post-&gt;title=$request-&gt;input('title');
     $post-&gt;photo=$request-&gt;photo; //what do i change in this field?
     $post-&gt;username=$request-&gt;input('username');
        $post-&gt;body=$request-&gt;input('body');
     $post-&gt;save();
     return redirect ('/ed');
  }
  </code></pre>
  
  <p>Any ideas would be appreciated, thank you</p>