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
#!/bin/bash | |
########## | |
# PHP STAN | |
########## | |
curl -OL https://github.com/phpstan/phpstan/releases/download/0.12.98/phpstan.phar | |
sudo chmod a+x phpstan.phar | |
sudo mv phpstan.phar /usr/local/bin/phpstan | |
########## |
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 | |
namespace App\Models; | |
/** | |
* @OA\Schema( | |
* schema="User", | |
* type="object", | |
* description="Schema of Model User", | |
* @OA\Property( |
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 | |
namespace App\Models; | |
class User extends \Framework\Package\Model | |
{ | |
/** | |
* The identification of this resource. | |
* | |
* @var integer |
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 | |
require_once __DIR__.'/../vendor/autoload.php'; | |
/* | |
|-------------------------------------------------------------------------- | |
| Instance Environment Variables. | |
|-------------------------------------------------------------------------- | |
*/ |
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 | |
namespace Modules\Users\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
use Illuminate\Routing\Controller; | |
use Modules\Users\Entities\User; | |
use Modules\Users\Http\Requests\UsersRequest; | |
use Ramsey\Uuid\Uuid; |
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 Controller | |
{ | |
public function index() | |
{ | |
return view('home', [ | |
'seguidores' => [ | |
'instagram' => ''// query para inseriros seguidores do instagram | |
'facebook' => ''// query para inseriros seguidores do facebook | |
] |
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 | |
foreach ($request->redesSociais as $redes) { | |
foreach ($redes as $key => $value) { | |
// para tratar os dados de cada rede | |
// aqui exibe campo por campo, seria para um tratamento de dados | |
} | |
// para salvar não é necessario fazer outro foreach, apenas o primeiro com as redes | |
$redes = new RedesSociais(); | |
$redes->tipo_redes_id = 1; //Coloquei Manual só pra teste |
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 Controller | |
{ | |
public function store(Request $request) | |
{ | |
dd($request->redesSociais); // dumping | |
foreach ($request->redesSociais as $index => $rede) { | |
// $index = 0, 1, 2 |
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
FROM phpdockerio/php73-fpm:latest | |
WORKDIR "/application" | |
# Fix debconf warnings upon build | |
ARG DEBIAN_FRONTEND=noninteractive | |
# Install selected extensions and other stuff | |
RUN apt-get update \ | |
&& apt-get -y --no-install-recommends install php7.3-mysql php-redis php7.3-sqlite3 \ | |
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* |
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
FROM phpdockerio/php73-fpm:latest | |
WORKDIR "/application" | |
# Fix debconf warnings upon build | |
ARG DEBIAN_FRONTEND=noninteractive | |
# Install selected extensions and other stuff | |
RUN apt-get update \ | |
&& apt-get -y --no-install-recommends install php7.3-mysql php-redis php7.3-sqlite3 \ | |
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* |
NewerOlder