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 | |
$d = $d ?? null; // default value | |
@endphp | |
<div class="form-group row"> | |
<label for="{{ $n }}" class="col-sm-4 col-form-label text-md-right"><b>{{ $l }}</b></label> | |
<div class="col-md-8"> | |
<input id="{{ $n }}" type="checkbox" class="form-control" name="{{ $n }}" value="1" @if(old($n, $d) == '1') checked @endif> | |
@if ($errors->has($n)) | |
<small class="text-danger">{{ $errors->first($n) }}</small> |
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 | |
// requiring autoload with the pluguin | |
require __DIR__ . '/../../vendor/autoload.php'; | |
// invoking needed classes | |
use PhpOffice\PhpSpreadsheet\Spreadsheet; //class responsible to change the spreadsheet | |
use PhpOffice\PhpSpreadsheet\Writer\Xlsx; //class that write the table in .xlsx | |
$spreadsheet = new Spreadsheet(); //instanciando uma nova planilha |
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
version: '3' | |
services: | |
api: | |
image: alterway/php:5.4-apache | |
environment: | |
PHP_php5enmod: 'mysqli' | |
HTTPD_a2enmod: 'rewrite headers' | |
volumes: | |
# ./api contains my PHP application | |
- "./api:/var/www/html" |
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 | |
// ADD NEW ADMIN USER TO WORDPRESS | |
// ---------------------------------- | |
// Put this file in your Wordpress root directory and run it from your browser. | |
// Delete it when you're done. | |
// Original script by Joshua Winn - https://joshuawinn.com/create-a-new-wordpress-admin-user-from-php | |
require_once('wp-blog-header.php'); | |
require_once('wp-includes/registration.php'); |
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 // Don't use this line. | |
/* | |
* Add the script below to wherever you store custom code snippets | |
* in your site, whether that's your child theme's functions.php, | |
* a custom plugin file, or through a code snippet plugin. | |
*/ | |
/** | |
* This function will connect wp_mail to your authenticated |
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 FlarumValetDriver extends ValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
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 | |
/***********************************************************************/ | |
/*************************** TRACKER CLASS ***************************/ | |
/***********************************************************************/ | |
if ( ! class_exists( 'Custom_Post_Types_Manager' ) ) { | |
class Custom_Post_Types_Manager { |
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
// Add on element with overflow | |
-webkit-mask-image: -webkit-radial-gradient(white, black); |
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
private static WritableMap convertJsonToMap(JSONObject jsonObject) throws JSONException { | |
WritableMap map = new WritableNativeMap(); | |
Iterator<String> iterator = jsonObject.keys(); | |
while (iterator.hasNext()) { | |
String key = iterator.next(); | |
Object value = jsonObject.get(key); | |
if (value instanceof JSONObject) { | |
map.putMap(key, convertJsonToMap((JSONObject) value)); | |
} else if (value instanceof JSONArray) { |
NewerOlder