*1) Press Windows Key + R. *2) Enter CMD and press Enter.
Write command in the cmd:
shutdown /s /t 3600
<?php | |
/** | |
* SEEDING DATABASE | |
* | |
* Faker Fileds: | |
* https://github.com/fzaninotto/Faker | |
* | |
* 1) Create database, model, migration | |
* 2) artisan make:seeder |
reference: http://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-6-x-7-x | |
yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm | |
yum update git |
APP_ENV=local | |
APP_DEBUG=true | |
APP_KEY=SomeRandomKey!!! | |
DB_CONNECTION=mysql | |
DB_HOST=localhost | |
DB_PORT=3306 | |
DB_DATABASE=homestead | |
DB_USERNAME=homestead | |
DB_PASSWORD=secret |
<?php | |
return PhpCsFixer\Config::create() | |
->setRules(array( | |
'@PSR2' => true, | |
'array_indentation' => true, | |
'array_syntax' => array('syntax' => 'short'), | |
'combine_consecutive_unsets' => true, | |
'method_separation' => true, | |
'no_multiline_whitespace_before_semicolons' => true, | |
'single_quote' => true, |
<?php | |
class PhotoApiTest extends TestCase { | |
public function setUp() | |
{ | |
parent::setUp(); | |
Route::enableFilters(); |
Simple contract or interface, call as you wish: | |
interface UnitOfWork | |
{ | |
public function begin(); | |
public function commit(); | |
public function rollback(); | |
} |
FROM php:7.4-fpm-alpine | |
WORKDIR /var/www/app | |
RUN apk add bash | |
# intl | |
RUN apk add --quiet zlib-dev icu-dev g++ | |
RUN docker-php-ext-install intl && docker-php-ext-enable intl |
<?php | |
function get_youtube_channel_ID($url){ | |
$html = file_get_contents($url); | |
preg_match("'<meta itemprop=\"channelId\" content=\"(.*?)\"'si", $html, $match); | |
if($match && $match[1]); | |
return $match[1]; | |
} |
<?php | |
use Illuminate\Foundation\Testing\WithoutMiddleware; | |
use Illuminate\Foundation\Testing\DatabaseMigrations; | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
class ExamplePassportTest extends \PassportTestCase | |
{ | |
use DatabaseTransactions; |