Lanzar el comando:
php artisan make:migration add_columnA_to_tableX
Esto creará la migración add_columnA_to_tableX:
class AddcolumnAToTableX extends Migration
function splitCsv(str) { | |
return str.split(',').reduce((accum,curr)=>{ | |
if(accum.isConcatting) { | |
accum.soFar[accum.soFar.length-1] += ','+curr | |
} else { | |
accum.soFar.push(curr) | |
} | |
if(curr.split('"').length % 2 == 0) { | |
accum.isConcatting= !accum.isConcatting | |
} |
Lanzar el comando:
php artisan make:migration add_columnA_to_tableX
Esto creará la migración add_columnA_to_tableX:
class AddcolumnAToTableX extends Migration
//Edit the following function (RedirectIfAuthenticated.php): | |
public function handle($request, Closure $next, $guard = null) | |
{ | |
if (Auth::guard($guard)->check()) { | |
//return redirect('/inicio'); | |
if(Auth::user()->hasAnyRole('admin')){ | |
return redirect()->route('datos'); | |
} | |
else if (Auth::user()->hasAnyRole('club','equipo')){ |
// Generating URLs... | |
$url = route('profile'); | |
// Generating Redirects... | |
return redirect()->route('profile'); | |
$url = route('profile', ['id' => 1]); |
use Illuminate\Support\Facades\Validator; | |
/* Primer se definen los mensajes de error */ | |
$messages = [ | |
'required' => 'El campo :attribute es obligatorio.', | |
/* Mensaje específico para el campo "email-acceso" */ | |
'email-acceso.unique' => 'El email de acceso ya existe.', | |
'unique' => 'El :attribute ya existe.', | |
]; |
public function filter(Request $request, User $user) | |
{ | |
$user = $user->newQuery(); | |
// Search for a user based on their name. | |
if ($request->has('name')) { | |
$user->where('name', $request->input('name')); | |
} | |
// Search for a user based on their company. |
# The MySQL server | |
[mysqld] | |
#Enable Slow Query Log | |
long_query_time = 1 | |
slow_query_log_file = "C:/slowquery.log" | |
#Do NOT Start Logging on Startup | |
slow_query_log = 1 | |
Functions: | |
/** | |
* Does something interesting | |
* | |
* @param Place $where Where something interesting takes place | |
* @param integer $repeat How many times something interesting should happen | |
* | |
* @throws Some_Exception_Class If something interesting cannot happen | |
* @author Monkey Coder <mcoder@facebook.com> |
You can produce the javascript file via PHP. Nothing says a javascript file must have a .js extention. For example in your HTML: | |
<script src='javascript.php'></script> | |
Then your script file: | |
<?php header("Content-type: application/javascript"); ?> | |
$(function() { | |
$( "#progressbar" ).progressbar({ | |
value: <?php echo $_SESSION['value'] ?> |
import fetchJsonp from 'fetch-jsonp'; | |
function handleSearch(user){ | |
//let url = 'https://api.github.com/users/'+user+'/repos'; | |
const token = '304163526.e0b4176.e924858e024645989aae580c6523aee0'; | |
let url = 'https://api.instagram.com/v1/tags/akebaso/media/recent?access_token=304163526.e0b4176.e924858e024645989aae580c6523aee0'; | |
fetchJsonp(url, { | |
method: 'GET', | |
mode: 'no-cors', |