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
$(document).ready(function() { | |
$('#num').bind('paste', function() { | |
var hasNum = somenteNumeros( $(this).val() ); | |
if( hasNum.length == 0 ) { | |
alert('Somente números'); | |
} else { | |
console.log('legal'); | |
} | |
}); | |
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 url = "get_data.php"; | |
var params = "lorem=ipsum&name=binny"; | |
http.open("POST", url, true); | |
//Send the proper header information along with the request | |
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | |
http.setRequestHeader("Content-length", params.length); | |
http.setRequestHeader("Connection", "close"); | |
http.onreadystatechange = function() {//Call a function when the state changes. |
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\Models; | |
use Illuminate\Database\Eloquent\Model; | |
class Event extends Model | |
{ | |
protected $table = 'events'; |
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'); | |
} | |
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
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 | |
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
<!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\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
<?php | |
Route::get('redirecting', function() { | |
if(\Auth::user()->permission == 'anunciante') { | |
return redirect('anunciante/home'); | |
} else { | |
return redirect('user/home'); | |
} | |
}); |