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 | |
laravel new $1 | |
cd $1 | |
cp ../_ide_helper.php . | |
cp .env.example .env | |
composer install | |
yarn install | |
php artisan key:generate |
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 | |
laravel new $1 | |
cd $1 | |
cp ../_ide_helper.php . | |
cp .env.example .env | |
composer install | |
yarn install | |
php artisan key:generate |
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 LocalValetDriver extends ValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
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 | |
public function frontControllerPath($sitePath, $siteName, $uri) | |
{ | |
$sitePath = $this->addSubdirectory($sitePath); | |
if (!isset($_GET['q']) && !empty($uri) && $uri !== '/') { | |
$_GET['q'] = $uri; | |
} |
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 | |
if (!isset($_GET['q']) && !empty($uri) && $uri !== '/' && strpos($uri, '/jsonapi/') === false) { | |
$_GET['q'] = $uri; | |
} |
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 Drupal\custom_api\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
/** | |
* Class SearchController. | |
*/ | |
class SearchController extends ControllerBase { |
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
custom_api.search: | |
path: 'custom_api/search/{search}' | |
defaults: | |
_controller: '\Drupal\custom_api\Controller\SearchController::search' | |
_title: 'ControllerMethod' | |
requirements: | |
_permission: 'access content' |
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
../vendor/bin/drupal generate:controller --module=custom_api --class=SearchController --routes='"title":"ControllerMethod", "name":"custom_api.search", "method":"search", "path":"custom_api/search/{search}"' --uri=my-site.com |
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
# Git aliases | |
alias gb="git branch" | |
alias gaa="git add ." | |
alias gc="git commit -a -m" | |
alias gs="git status" | |
alias nah="git reset --hard; git clean -df;" |
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
[alias] | |
co = checkout | |
s = status | |
l = log | |
url = config --get remote.origin.url |
OlderNewer