title: view does not appear, only data appears
body: <p>i want to passing data to view</p>
  
  <p>my controller</p>
  
  <pre><code>public function create()
  {
      $maxcode=Product::selectRaw('MAX(RIGHT(product_code, 3)) as max')-&gt;first();
      $prx='P2018-';
      if($maxcode-&gt;count()&gt;0)
      {
              $tmp = ((int)$maxcode-&gt;max)+1;
              $newcode = $prx.sprintf("%03s", $tmp);
      }
      else
      {
          $newcode = $prx."P2018-001";
      }
  
      return $newcode;
  
      return view('product.create', $newcode);
  }
  </code></pre>
  
  <p>my view</p>
  
  <pre><code>...other code...
  
  @foreach($newcode as $nc)
      {{$nc-&gt;newcode}}
  @endforeach
  
  ---other code...
  </code></pre>
  
  <p>the code works well, but the only results appear, the other code on the view does not work.</p>
  
  <p>someone might be able to help me</p>