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\Controller; | |
use Illuminate\Http\Request; | |
use Auth; | |
// Nama class tidak StudlyCaps dan tanda kurung kurawal tidak dipisah setelah kata controller | |
class logincontroller 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
server { | |
# SSL configuration | |
# | |
# listen 443 ssl default_server; | |
# listen [::]:443 ssl default_server; | |
# | |
# Note: You should disable gzip for SSL traffic. | |
# See: https://bugs.debian.org/773332 | |
# |
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
function QueryStringToJSON(value) { | |
var pairs = value.split('&'); | |
var result = {}; | |
pairs.forEach(function(pair) { | |
pair = pair.split('='); | |
result[pair[0]] = decodeURIComponent(pair[1] || ''); | |
}); | |
return JSON.parse(JSON.stringify(result)); |
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 | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| Default deployment strategy | |
|-------------------------------------------------------------------------- | |
| | |
| This option defines which deployment strategy to use by default on all |
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 Deployer; | |
task('artisan:generate', function() { | |
run('{{bin/php}} {{release_path}}/artisan key:generate'); | |
}); |
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 Deployer; | |
desc('Deploy secrets'); | |
task('deploy:secrets', function() { | |
// deploy_path sudah di definisikan di dalam file deploy.php | |
run('cp $HOME/env/laravel-gl-action/.env {{deploy_path}}/shared'); | |
}); |
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 Deployer; | |
desc('Copy env staging value'); | |
task('copy_env:staging_value', function() { | |
run('cp /home/deployer/env-laravel/laravel-basic/staging/.env /var/www/test-laravel-basic/shared/'); | |
}); |
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
#!/usr/bin/env bash | |
REPO='[email protected]:BaliPHP/phpbali-site.git'; #nama repo saya | |
RELEASE_DIR='/var/www/phpbali-site/releases'; # direktori aplikasi saya | |
APP_DIR='/var/www/phpbali-site/app'; # direktori aplikasi saya | |
RELEASE="release_`date +%Y%m%d%H%M%s`"; | |
# tempat saya menaruh .env production file | |
# Jika Anda tidak ingin mengikuti cara ini pastikan Anda hapus perintah | |
# yang ada komentar # Copy .env file | |
ENV_PRODUCTION='/home/deployer/env-laravel/phpbali-site/production/.env'; |
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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Util | |
{ | |
public function currencyDecimalConverter($value) | |
{ | |
$number = (float)$value; | |
return number_format($number, 2, ",", "."); | |
} |
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
[build] | |
publish = "public" | |
command = "hugo --gc --config config.production.toml" | |
[context.production.environment] | |
HUGO_VERSION = "0.53" | |
HUGO_ENV = "production" | |
HUGO_ENABLEGITINFO = "true" | |
[context.split1] |