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
Aqui vai uma lista de pequenos projetos que você pode criar (e pesquisar sobre) para deixar no seu GitHub: | |
- Login com usuário e senha; e Social Login com Google, Facebook ou GitHub | |
- Deploy de aplicação em máquina virtual na nuvem | |
- Configurar certificado SSL em uma API com Let's Encrypt | |
- Um sistema de batalha de heróis usando TDD | |
- Fluxo de CI & CD no Jenkins | |
- Fazer um CRUD em uma API com dois bancos de dados diferentes (MongoDB e Postgres) usando o padrão de projeto Strategy |
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
docker pull mcr.microsoft.com/mssql/server:2019-CU3-ubuntu-18.04 | |
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=!@12QWqw" -p 1433:1433 --name sql1 -d mcr.microsoft.com/mssql/server:2019-CU3-ubuntu-18.04 | |
docker ps -a | |
docker exec -it sql1 "bash" | |
clear | |
uname -a | |
cd /opt/mssql-tools/bin | |
pwd | |
clear | |
./sqlcmd -S localhost -U SA |
#Teclas de atalhos do PHPStorm com funções semelhantes ao Sublime Text, e outras interessantes.
Sublime Text | PHPStorm | Função |
---|---|---|
CMD+P | CMD+Shift+O | Busca por arquivos no projeto |
CMD+R | CMD+F12 (1) | Lista os métodos da classe e outros símbolos |
CMD+F | CMD+F | Busca no arquivo |
CMD+Option+F | CMD+R | Busca e troca os valores no arquivo |
CMD+Shift+F | CMD+Shift+F | Busca, busca e troca e outros em um determinado caminho com várias regras. |
CMD+D (2) | Option+Up (2) | Seleciona palavra |
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
//codigo no controller(ForncedorController) | |
public function estado() | |
{ | |
return $this->hasOne(Estado::class,'id','estado_id'); | |
} | |
public function empresas() | |
{ | |
return $this->belongsTo(Empresa::class,'empresa_id','id'); | |
} |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<script type="text/javascript" src="jquery-1.7.1.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
$.getJSON('estados_cidades.json', function (data) { |
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\Controllers; | |
use App\Models\Product; | |
use App\Models\ProductPhoto; | |
use Illuminate\Http\Request; | |
class ProductController extends Controller | |
{ |
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
//requeiments: | |
// $ composer require cloudinary-labs/cloudinary-laravel | |
// $ php artisan vendor:publish --provider="CloudinaryLabs\CloudinaryLaravel\CloudinaryServiceProvider" --tag="cloudinary-laravel-config" | |
public function storeUploads(Request $request) | |
{ | |
$image = $request->file('file'); | |
$image_name = $image->getClientOriginalName(); |
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\Exports; | |
use App\Models\User; | |
use Maatwebsite\Excel\Concerns\FromCollection; | |
use Maatwebsite\Excel\Concerns\WithHeadings; | |
use Maatwebsite\Excel\Concerns\WithMapping; | |
use Maatwebsite\Excel\Concerns\ShouldAutoSize; |
OlderNewer