This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DadosAnuncios { | |
public function index() | |
{ | |
$confirmeds = Anuncios::where('confirmed', true)->get(); | |
foreach($confirmeds as $items) { | |
if( $items['genero'] == 'masc') { | |
$masc[] = $items; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$('.confirm').click(function() { | |
var $button = $(this); | |
$.ajax({ | |
url: '/confirm', | |
method: 'POST', | |
data: { | |
userID: $button.data('id') | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if( $meucampo == 'confirmed' ) | |
<span>Você está confirmado</span> | |
@else | |
<input type="submit" value="Confirmar"> | |
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use DB; | |
use Illuminate\Http\Request; | |
use App\Evento; | |
use Auth; | |
use App\User; | |
use App\Usuario; | |
use App\Preferencia; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Helpers\Billet; | |
use App\Helpers\Register; | |
use App\Helpers\UUID; | |
use Input; | |
use Admin; | |
use Config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>GO2FUN </title> | |
<link href="/css/bootstrap.css" rel="stylesheet" type="text/css" media="all" /> | |
<link rel="stylesheet" href="/vendor/bootstrap/css/bootstrap.css"/> | |
<link rel="stylesheet" href="/dist/css/formValidation.css"/> | |
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
(function( $ ) { | |
$('#MyForm').submit(function() { | |
$.ajax({ | |
url: 'http://localhost:8000/url/para/a/rota', | |
method: 'POST', | |
success: function( response, textStatus, jqXHR ) { | |
// message vem da key 'message' no response de sucesso do controller. | |
$('#alertas').text(response.message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::post('url/para/a/rota', 'FormController@index'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Request as RequestAjax; | |
class FormController extends Controller | |
{ | |
public function index( Request $request ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="col-xs-12"> | |
<div id="alertas"></div> | |
{{ Form::open([ | |
'url' => url('url/para/a/rota'), | |
'id' => 'MyForm', | |
'method' => 'POST' | |
]); | |
{{ Form::text('nome', '', ['class'=>'form-group', 'id'=>'nome']) }} | |