Create a job in laravel with command artisan
php artisan make:command ExampleCron --command=example:cron
Navigate to file create in project
app\Console\Commands\ExampleCron.php
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
// function transform BRL em DECIMAL // R$ 1.000,00 em 1000.00 | |
function formatMoeda(get_valor) { | |
replace = get_valor.replace('.', ''); | |
retorno = replace.replace(',', '.'); | |
return retorno; | |
} | |
// set front-end money BRL (R$) JavaScript |
$('#tbl_completa').DataTable({ | |
"dom": "'B'"+"<'row'<'col-xs-6'l><'col-xs-6'f>>\ | |
<'row'<'col-xs-12'<'table-responsive't>r>>\ | |
<'row'<'col-xs-5'i><'col-xs-7'p>>", | |
buttons: [ | |
{ | |
extend: 'excelHtml5', | |
text: '<i class="fas fa-file-excel-o"></i>', | |
titleAttr: 'Exportar Excel' | |
}, |
protected $middleware = [ | |
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode', | |
'Illuminate\Cookie\Middleware\EncryptCookies', | |
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse', | |
'Illuminate\Session\Middleware\StartSession', | |
'Illuminate\View\Middleware\ShareErrorsFromSession', | |
// adicionar esta linha | |
'MyApp\Http\Middleware\HttpsProtocol' |
namespace MyApp\Http\Middleware; | |
use Closure; | |
use Illuminate\Support\Facades\App; | |
class HttpsProtocol { | |
public function handle($request, Closure $next) | |
{ | |
if (!$request->secure() && App::environment() === 'production') { |
#Configurações básicas | |
git config --global user.name "<username>" | |
git config --global user.email "<email>" | |
git config --global core.editor <comando editr> //Opcional | |
#Todas as informações de configuração | |
git config --list | |
#Verificar configuração | |
git config user.name |
*Pré requisitos ********* | |
=> git instalado | |
=> heroku cli instalado | |
=> aplicação gerenciada pelo git | |
************************* | |
#Login no heroku | |
heroku login | |
#Criando aplicação |
@ CD %userprofile%\AppData\Local\Android\Sdk\emulator | |
@ ECHO SUAS "AVDS" CRIADAS NO ANDROID_STUDIO | |
@ ECHO ----------------------------- | |
@ emulator -list-avds | |
@ ECHO ----------------------------- | |
@ ECHO Por favor, digite o nome da sua imagem antes de continuar... | |
@ SET /p iso=NOME AVD --^> | |
@ emulator -avd %iso% |
heroku run bash -app=XXXXX |