SHARE
TWEET

Edit.blade.php

a guest Dec 3rd, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @extends('layouts.template')
  2.  
  3. @section('title', 'Edit user')
  4.  
  5. @section('main')
  6.     <h1>Edit user: {{ $user->name }}</h1>
  7.     <form action="/admin/users/{{ $user->id }}" method="post" novalidate>
  8.         @method('put')
  9.  
  10.         @csrf
  11.         <div class="form-group">
  12.             <label for="name">Name</label>
  13.             <input type="text" name="name" id="name"
  14.                    class="form-control @error('name') is-invalid @enderror"
  15.                    placeholder="Your name"
  16.                    value="{{ old('name', $user->name) }}"
  17.                    required>
  18.             @error('name')
  19.             <div class="invalid-feedback">{{ $message }}</div>
  20.             @enderror
  21.         </div>
  22.         <div class="form-group">
  23.             <label for="email">Email</label>
  24.             <input type="email" name="email" id="email"
  25.                    class="form-control @error('email') is-invalid @enderror"
  26.                    placeholder="Your email"
  27.                    value="{{ old('Email', $user->email) }}"
  28.                    required>
  29.             @error('email')
  30.             <div class="invalid-feedback">{{ $message }}</div>
  31.             @enderror
  32.         </div>
  33.  
  34.  
  35.         <div class="form-group">
  36.             <input type="checkbox" name="active" id="active"
  37.                    value="1" {{ old('active', $user->active) ? 'checked="checked"' : ''   }}>Active
  38.             <input type="checkbox" name="admin" id="admin"
  39.                    value="1" {{ old('admin', $user->admin) ? 'checked="checked"' : ''    }}>Admin
  40.         </div>
  41.  
  42.  
  43.         <button type="submit" class="btn btn-success">Save user</button>
  44.     </form>
  45.  
  46. @endsection
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top