Got it! Here's How:
(1) In the migrations folder I added the variable to the table:
$table->integer('group_id');
(2) In the model User.php I added the variable to the fillable array:
protected $fillable = [
'name', 'email', 'password','group_id'
];
(3) In web.php I removed Auth::routes(); and added:
// Authentication Routes...
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout')->name('logout');
// Registration Routes...
Route::get('register/{group_id}', 'Auth\RegisterController@showRegistrationForm')->name('register');
Route::post('register', 'Auth\RegisterController@register')->name('post.register');
// Password Reset Routes...
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
Route::post('password/reset', 'Auth\ResetPasswordController@reset');
(4) In RegisterController.php I added a function to override the function in the vendor folder:
public function showRegistrationForm($group_id)
{
//dd($group_id);
return view('auth.register')->with(['group_id' => $group_id]);
}
Then added the variable to the create function:
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
'group_id' => $data['group_id']
]);
}
(5) In register.blade.php I added a hidden input field:
<input id="group_id" type="hidden" class="form-control" name="group_id" value="{{{ $group_id }}}" required>
and thanks to @Snapey I changed the route to:
action="{{ route('post.register') }}"
and also Thanks to @Snapey I changed the in app.blade.php to:
action="{{ route('post.register') }}"
Now WHY did I do it? I want to give users a unique registration link and then tailor their experience by the unique number in the URL.
My last question is: "was there a better way to do this?"
Thanks so much to @robrogers3 , @Snapey @RamjithAp and to anyone else who took the time to read this!