Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel error not responding well

  namespace AppHttpControllersAuth;
//RegisterController.php


use AppModelsUser;
use IlluminateHttpRequest;
use AppHttpControllersController;
use IlluminateSupportFacadesHash;


class RegisterController extends Controller
{
    //
    public function index()
    {
        return view('auth.register');
    }

    public function store(Request $request)
    {
$this->validate($request, [
            'first_name' => 'required|max:255',
            'last_name' => 'required|max:255',
            'username' => 'required|max:255',
            'email' => 'required|email|max:255',
            'password' => 'required|confirmed'
        ]);

        User::create([
            'first_name' => $request->first_name,
            'last_name' => $request->last_name,
            'username' => $request->username,
            'email' => $request->email,
            'password' => Hash::make($request->password)
        ]);
    }
}

```
 <input type="text" name="first_name" id="first_name" placeholder="First name"
            class="bg-gray-100 border-2 w-full p-4 
            rounded-lg @error('first_name') border-red-500 @enderror" value="{{old('first_name')}}">is is not italic</i>, and [this is not a link](https://example.com)
```
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #error #responding
ADD COMMENT
Topic
Name
6+6 =