Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. @extends('layout.app')
  2.  
  3. @section('content')
  4. <style>
  5. .uper { margin-top: 40px; }
  6. </style>
  7. <div class="uper">
  8. @if(session()->get('success'))
  9. <div class="alert alert-success">
  10. {{ session()->get('success') }}
  11. </div><br />
  12. @endif
  13. <button class="btn btn-primary" onclick="window.location.href='./employees/create'" type="button">Add new employee</button>
  14. <table class="table table-striped">
  15. <thead>
  16. <tr>
  17. <td>Firstname</td>
  18. <td>Lastname</td>
  19. <td>Email</td>
  20. <td>Department</td>
  21. <td colspan="2">Action</td>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. @foreach($employees as $employee)
  26. <tr>
  27. <td>{{$employee->firstname}}</td>
  28. <td>{{$employee->lastname}}</td>
  29. <td>{{$employee->email}}</td>
  30. <td>{{$employee->department}}</td>
  31. <td><a href="{{ route('employees.edit',$employee->id)}}" class="btn btn-primary">Edit</a></td>
  32. <td>
  33. <form action="{{ route('employees.destroy', $employee->id)}}" method="post">
  34. @csrf
  35. @method('DELETE')
  36. <button class="btn btn-danger" type="submit">Delete</button>
  37. </form>
  38. </td>
  39. </tr>
  40. @endforeach
  41. </tbody>
  42. </table>
  43. <div>
  44. @endsection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement