Monday, August 10, 2020

Crud Files

Tags

User

    view.blade.php


<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">

  <table class="table table-striped">
    <thead>
      <tr>
          <th>Id</th>
        <th>First Name</th>
        <th>Gender</th>
        <th>Hobby</th>
        <th>Country</th>
        <th>State</th>
        <th>City</th>
        <th>Action</th>
      </tr>
    </thead>

    @if(count($userpass)>0)

        @foreach($userpass as $row)

            <tr>
                <td>{{$row->id}}</td>
                <td>{{$row->fname}}</td>
                <td>{{$row->gender}}</td>
                <td>{{$row->hobby}}</td>
                <td>{{$row->countryname}}</td>
                <td>{{$row->statename}}</td>
                <td>{{$row->cityname}}</td>
                <td>
                  //   <a href="{{URL('admin/user'),$row->id}}/edit" class="btn btn-primary">Edit</a>
                    <a href="{{$row->id}}/edit" class="btn btn-primary">Edit</a>
                    {!! Form::open(['action'=>['admin\userform@destroy',$row->id],'method'=>'post']) !!}

                    {{ Form::hidden('_method','DELETE')}}
                    {{Form::submit('Delete',['class'=>'btn btn-danger btn-cons m-b-10 bold'])}}
                    {!! Form::close() !!}



                </td>
            </tr>

        @endforeach

    @endif

  </table>
</div>

</body>
</html>


EmoticonEmoticon