title: Same code but I can't recive GET parameter
body: <p>I made a contact form which works perfect I could receive GET parameter
  About another project, I use same program code and add couple of JS file after that
  I couldn't receive GET parameter. I don't think JS file affect it...
  Could you teach me why I can't receive GET parameter please?</p>
  <p>UPDATE ERROR CODE</p>
  <blockquote>
  <p>SQLSTATE[HY000]: General error: 1364 Field 'pid' doesn't have a
  default value</p>
  </blockquote>
  <p>Here is my URL:</p>
  <p><a href="https://test11223344556677.com/test/public/contact?pid=d2D4B3j2D8Xf3" rel="nofollow noreferrer">https://test11223344556677.com/test/public/contact?pid=d2D4B3j2D8Xf3</a></p>
  <p>Controller:</p>
  <pre><code>namespace App\Http\Controllers;
      use Illuminate\Http\Request;
      use App\Contact;
      use Mail;
      
      class ContactUsFormController extends Controller {
      
          // Create Contact Form
          public function createForm(Request $request) {
            return view('contact');
          }
      
          // Store Contact Form data
          public function ContactUsForm(Request $request) {
      
              // Form validation
              $this-&gt;validate($request, [
                'name' =&gt; 'required',
                'phone' =&gt; 'required|regex:/^([0-9\s\-\+\(\)]*)$/|min:10',
               ]);       
              //  Get ip
              $request['ip'] = $request-&gt;ip();
              //  Get User-Agent
              $request['ua'] = $request-&gt;server('HTTP_USER_AGENT');
              //  Store data in database
              Contact::create($request-&gt;all());
      
              //  Send mail to admin
              \Mail::send('mail', array(
      
                  'name' =&gt; $request-&gt;get('name'),
                  'phone' =&gt; $request-&gt;get('phone'),
                  'pid' =&gt; $request-&gt;get('pid'),
      
              ), function($message) use ($request){
                  $message-&gt;from($request-&gt;email);
                  $message-&gt;to('mymail@mymail.site', 'title')-&gt;bcc('mail2@mail2.site')-&gt;subject($request-&gt;get('title2'));
              });
      
              return back()-&gt;with('success', 'thank you');
          }
      
      }
  </code></pre>
  <p>web.php</p>
  <pre><code>    use Illuminate\Support\Facades\Route;
      
      
      // Render in view
      Route::get('/contact', [
          'uses' =&gt; 'ContactUsFormController@createForm'
      ]);
      
      // Post form data
      Route::post('/contact', [
          'uses' =&gt; 'ContactUsFormController@ContactUsForm',
          'as' =&gt; 'contact.store'
      ]);
  </code></pre>
  <p>UPDATE<br />
  with Dear STA taught me this code<br />
  <code>$data['pid'] = $request-&gt;pid ?? 'default value';</code></p>
  <p><a href="https://i.stack.imgur.com/1xEwK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1xEwK.jpg" alt="enter image description here" /></a></p>
  <p>If I don't use above code I couldn't get pid value.
  Take a look below image. pid is gone
  <a href="https://i.stack.imgur.com/Zlogs.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zlogs.jpg" alt="enter image description here" /></a></p>