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.path":"C:\\laragon\\bin\\git\\bin\\git.exe", | |
"php.validate.executablePath": "C:\\laragon\\bin\\php\\php-7.1.14-Win32-VC14-x64\\php.exe", | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.statusBar.visible": false, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.snippetSuggestions": "top", | |
"editor.formatOnPaste": true, | |
"explorer.openEditors.visible": 0, | |
"workbench.activityBar.visible": true, |
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 | |
Response::macro('csv', function($data, $filename = 'data.csv', $status = 200, $delimiter = ",", $linebreak = "\n", $headers = array()) | |
{ | |
return Response::stream(function () use ($data, $delimiter, $linebreak) { | |
foreach ($data as $row) { | |
$keys = array(); $values = array(); | |
$firstPassComplete = (isset($firstPassComplete)) ? true:false; | |
foreach ($row as $k => $v) { | |
if (!$firstPassComplete){ |
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
@servers(['web' => '[email protected]']) | |
@task('deploy') | |
{{--"project" is the name of the project that is being deployed into /var/www/home--}} | |
rm -rf /var/www/home/project && mkdir /var/www/home/project | |
{{--Navigate to the project folder--}} | |
cd /var/www/home/project | |
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
server { | |
listen 80; | |
root /vagrant; | |
index index.html index.htm index.php app.php app_dev.php; | |
# Make site accessible from http://set-ip-address.xip.io | |
server_name 192.168.33.10.xip.io; | |
access_log /var/log/nginx/vagrant.com-access.log; | |
error_log /var/log/nginx/vagrant.com-error.log error; |
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/sh | |
WEBROOT=/var/www/domain.com/project | |
GIT_WORK_TREE=$WEBROOT git checkout -f | |
#change directory to the project dir | |
cd $WEBROOT | |
rm -f storage/cache/* | |
echo 'cache cleared' | |
rm -f storage/views/* | |
echo 'views cleared' | |
# Check if a composer.json file is present |
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 | |
/********************************************************************************************* | |
* Example usage (In view) | |
* <div class="welcome"> | |
<?php echo Form::open(array('route'=>'process','class'=>'form-horizontal'))?> | |
<?php echo Form::textField('first_name')?> | |
<?php echo Form::textField('last_name')?> | |
<?php echo Form::emailField('email')?> | |
<?php echo Form::passwordField('password')?> | |
<?php echo Form::selectField('select_one', array('1'=>'abc', '2'=>'def'))?> |
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
<!-- email --> | |
<div class="form-group"> | |
<?php echo Form::label('email',null,array('class'=>'col-lg-2 control-label'))?> | |
<div class="col-lg-4"> | |
<?php echo Form::email('email', null, | |
array('class'=>'form-control', 'placeholder'=>'email'))?> | |
{{$errors->first('email', '<span class="alert alert-error">:message</span>')}} | |
</div> | |
</div> |