 | |
{ | |
pwd=$(pwd) | |
windowsHome=$(echo $HOME) | |
linuxHome="~" | |
lpwd=${pwd/$windowsHome/$linuxHome} | |
echo $lpwd | |
} |
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 | |
/** | |
* Recursively changes the first character register of all keys in an array. | |
* @param array $array The array to work on | |
* @param int $case Either CASE_UPPER or CASE_LOWER (default) | |
* @return array Returns an array with its keys lower or uppercase. | |
* | |
* Inspired by http://php.net/manual/en/function.array-change-key-case.php | |
* @author Grigory Alexandrov <[email protected]> |
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
server { | |
listen 80; | |
server_name laravel.loc; | |
root /vagrant/www/laravel.loc/public; | |
index index.php index.html index.htm; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} |
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 | |
/** | |
* Application requirement checker script. | |
* | |
* In order to run this script use the following console command: | |
* php requirements.php | |
* | |
* In order to run this script from the web, you should copy it to the web root. | |
* If you are using Linux you can create a hard link instead, using the following command: | |
* ln requirements.php ../requirements.php |
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
# JetBrains IDE | |
.idea | |
# Windows thumbnail cache | |
Thumbs.db | |
desktop.ini | |
debug.log | |
# Mac DS_Store Files | |
*.DS_Store |
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
// Create method in your model class | |
public function getManyToManyTableName($relationName) | |
{ | |
$string = ''; | |
$array = $this->$relationName; | |
if(empty($array)) { | |
return Yii::t('app', 'Not set'); | |
} | |
$arrayLength = count($array); | |
$counter = 0; |
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
### Basic package | |
Options +FollowSymLinks | |
IndexIgnore */* | |
RewriteEngine on | |
# Если запрос не начинается с web, добавляем его | |
RewriteCond %{REQUEST_URI} !^/(web) | |
RewriteRule (.*) /web/$1 | |
# Если файл или каталог не существует, идём к /web/index.php |
NewerOlder