Skip to content

Instantly share code, notes, and snippets.

View raank's full-sized avatar

Felipe Rank raank

  • Self-Employeer
  • SC - BR
View GitHub Profile
@if( $meucampo == 'confirmed' )
<span>Você está confirmado</span>
@else
<input type="submit" value="Confirmar">
@endif
(function($) {
$('.confirm').click(function() {
var $button = $(this);
$.ajax({
url: '/confirm',
method: 'POST',
data: {
userID: $button.data('id')
},
<?php
class DadosAnuncios {
public function index()
{
$confirmeds = Anuncios::where('confirmed', true)->get();
foreach($confirmeds as $items) {
if( $items['genero'] == 'masc') {
$masc[] = $items;
} else {
<?php
Route::get('redirecting', function() {
if(\Auth::user()->permission == 'anunciante') {
return redirect('anunciante/home');
} else {
return redirect('user/home');
}
});
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
<!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>
<?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;
@raank
raank / myChart.js
Last active October 18, 2016 18:11
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)',
<?php
Route::group([
'prefix' => 'anunciante',
'middleware' => 'anun'
], function() {
Route::get('', 'Anunciante@index');
});
Route::group([
@raank
raank / events.php
Last active October 24, 2016 23:40
<?php
public function test()
{
return $this->hasMany(ModelConfirmeds::class, 'idanunciante');
}