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
(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
<?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
<?php | |
Route::get('redirecting', function() { | |
if(\Auth::user()->permission == 'anunciante') { | |
return redirect('anunciante/home'); | |
} else { | |
return redirect('user/home'); | |
} | |
}); |
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\Middleware; | |
use Closure; | |
use Illuminate\Support\Facades\Auth; | |
class RedirectIfAuthenticated | |
{ | |
/** |
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"> | |
<style> |
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 DB, Auth, Redirect; | |
use App\User; | |
use App\Anunciante; | |
use Illuminate\Support\Facades\Input; | |
use App\Http\Requests; |
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
var myChart9Theme = { | |
type: 'bar', | |
data: { | |
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], | |
datasets: [{ | |
label: '# of Votes', | |
data: [12, 19, 3, 5, 2, 3], | |
backgroundColor: [ | |
'rgba(255, 99, 132, 0.2)', | |
'rgba(54, 162, 235, 0.2)', |
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::group([ | |
'prefix' => 'anunciante', | |
'middleware' => 'anun' | |
], function() { | |
Route::get('', 'Anunciante@index'); | |
}); | |
Route::group([ |
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 | |
public function test() | |
{ | |
return $this->hasMany(ModelConfirmeds::class, 'idanunciante'); | |
} | |