This file contains hidden or 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
$options = new \ZipStream\Option\Archive(); | |
$options->setSendHttpHeaders(true); | |
$options->setDeflateLevel(9); | |
//$options->setEnableZip64(false); | |
$zip = new \ZipStream\ZipStream('fichiers.zip', $options); | |
foreach($clients as $client) { | |
$documentName = $client->getFirstMedia('document')->file_name; | |
$documentPath = str_replace(auth()->user()->email, $client->user_email, $client->getFirstMediaPath('document')); | |
$zip->addFileFromPath(Str::slug(trim($client->user_email), '-') . '/' . $documentName, $documentPath); |
This file contains hidden or 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
let geoTracker = new mapboxgl.GeolocateControl({ | |
positionOptions: { | |
enableHighAccuracy: true | |
}, | |
trackUserLocation: false, | |
showUserLocation: true, | |
}); | |
geoTracker.on('geolocate', function (e) { | |
getGeoJson(e.coords.longitude, e.coords.latitude, 5); |
This file contains hidden or 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\Traits; | |
use Box\Spout\Writer\Common\Creator\WriterEntityFactory; | |
trait Export | |
{ | |
public static function export($target, $items) | |
{ | |
$writer = WriterEntityFactory::createXLSXWriter(); |
This file contains hidden or 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; | |
use App\Traits\Export; | |
use Illuminate\Database\Eloquent\Model; | |
class Registration extends Model | |
{ | |
use Export; |
This file contains hidden or 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
"require": { | |
"php": "^7.2", | |
"bacon/bacon-qr-code": "^2.0", | |
"barryvdh/laravel-dompdf": "^0.8.5", | |
"box/spout": "^3.0", | |
"caouecs/laravel-lang": "^4.0", | |
"fideloper/proxy": "^4.0", | |
"fzaninotto/company-name-generator": "dev-master", | |
"giggsey/libphonenumber-for-php": "^8.10", | |
"guzzlehttp/guzzle": "^6.3", |
This file contains hidden or 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\Log; | |
class Https | |
{ | |
/** |
This file contains hidden or 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
$custom-file-text: ( | |
en: "Browse", | |
es: "Elegir", | |
fr: "Parcourir" | |
); |
This file contains hidden or 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 | |
/** composer require fzaninotto/company-name-generator */ | |
use App\Models\MyModel; | |
use Faker\Generator as Faker; | |
$factory->define(MyModel::class, function (Faker $faker) { | |
$faker->addProvider(new CompanyNameGenerator\FakerProvider($faker)); |
This file contains hidden or 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; | |
use App\Models\Traits\Uuid; | |
class MyModel extends Model | |
{ | |
use Uuid; |
This file contains hidden or 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
# mac book pro | |
export PATH=$HOME/.composer/vendor/bin:$PATH | |
POWERLEVEL9K_MODE='nerdfont-complete' | |
source ~/powerlevel9k/powerlevel9k.zsh-theme | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(ssh dir vcs newline status) | |
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=() | |
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true | |
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shel$ |