Skip to content

Instantly share code, notes, and snippets.

@betinho37
Created July 27, 2017 13:31
Show Gist options
  • Save betinho37/da5ba7bc4c62f58533885ee813d7144e to your computer and use it in GitHub Desktop.
Save betinho37/da5ba7bc4c62f58533885ee813d7144e to your computer and use it in GitHub Desktop.
@extends('layouts.app')
@section('content')
<head>
<script src="{{ asset('js/jquery-3.2.1.js') }}"></script>
<script src="{{ asset('js/jquery.maskedinput.min.js') }}"></script>
<script type="text/javascript">
$(document).ready( function() {
$('#data').mask('d/m/Y');
});
</script>
</head> <h1>Lista de Pagamentos</h1>
<table align="center" class="table">
<tr>
<th>Destino</th>
<th>Descrição</th>
<th>Valor</th>
<th>Vencimento</th>
<th>Soma</th>
<th>Opcões</th>
</tr>
@foreach( $pagamentos as $pagamentos );
<tr>
<td>{{ $pagamentos->destino->name }}</td>
<td>{{ $pagamentos->name }}</td>
<td>{{ 'R$ '. number_format($pagamentos->valor, 2, ',', '.') }} </td>
<td>{{ date( 'd/m/Y' , strtotime($pagamentos->data ))}} </td>
<td>{{ $pagamentos->$soma}}</td>
<td><a href="{{@url('pagamentos').'/'. $pagamentos->id . '/edit'}}" class="btn btn-primary">Editar</a></td>
<td>
<form action="{{ URL::route('pagamentos.destroy', $pagamentos->id) }}" method="POST">
<input type="hidden" name="_method" value="DELETE" >
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<button class="btn btn-danger">Excluir</button>
</form>
</td>
</tr>
@endforeach
</table>
<a href="/pagamentos/create" class="btn btn-primary">Novo</a>
<a href="paginainicial" class="btn btn-primary">Inicio</a>
@endsection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment