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
# encoding: UTF-8 | |
# Files in the config/locales directory are used for internationalization | |
# and are automatically loaded by Rails. If you want to use locales other | |
# than English, add the necessary files in this directory. | |
# To use the locales, use `I18n.t`: | |
# I18n.t 'hello' | |
# In views, this is aliased to just `t`: | |
# <%= t('hello') %> | |
# To use a different locale, set it with `I18n.locale`: | |
# I18n.locale = :es |
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
Controllers: | |
- File and Folder Structure: | |
App/Http/Controllers | |
/Backend/ | |
AdminController.php | |
WorkplaceController.php | |
WorkplaceDeliveryController.php | |
... | |
/Frontend/ | |
... |
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
@if ($errors->any()) | |
<div class="alert alert-danger"> | |
@foreach ($errors->all() as $error) | |
{!! $error !!}<br/> | |
@endforeach | |
</div> | |
@endif | |
@if (Session::get('flash_success')) | |
<div class="alert alert-success"> | |
@if(is_array(Session::get('flash_success'))) |
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 < 5.3.6 | |
foreach (debug_backtrace() as $trace) | |
{ | |
echo sprintf("\n%s:%s %s::%s", $trace['file'], $trace['line'], $trace['class'], $trace['function']); | |
} | |
die; | |
// PHP >= 5.3.6 | |
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); | |
die; |
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 | |
Artisan::command('db:port-original', function () { | |
//Laravel Remote is AWESOEM // https://laravelcollective.com/docs/5.3/ssh#sftp-downloads ... | |
//make sure process does not get killed | |
set_time_limit(0); | |
//define some values | |
$archiveName = env('ORIGINAL_SERVER_DB_DUMP_ARCHIVE_NAME'); |
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 | |
//import db from original server to local one... | |
/** | |
* Instructions: | |
* 1. Install this package: https://laravelcollective.com/docs/5.3/ssh | |
* 2. Add those to your .env file and fill up the values: | |
ORIGINAL_SERVER_SSH_ADDRESS= | |
ORIGINAL_SERVER_SSH_USERNAME= |
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 Remote Connection Name | |
|-------------------------------------------------------------------------- | |
| | |
| Here you may specify the default connection that will be used for SSH |
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 | |
//to generate: https://gist.github.com/YavorK/f91780cd29a290fd7b9846f97ab8cf17 | |
$maleNames = array ( | |
0 => 'Jamey Bogan', | |
1 => 'Dr. Afton Crona V', | |
2 => 'Ronaldo Bahringer PhD', | |
3 => 'Dr. Korbin Feeney I', | |
4 => 'Jamil Beer', |
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 | |
// this script uses https://github.com/fzaninotto/Faker | |
// to generate male/female names: | |
require 'vendor/autoload.php'; | |
// use the factory to create a Faker\Generator instance | |
$faker = Faker\Factory::create(); | |
// generate data by accessing properties | |
$maleNames = []; |
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 | |
class DateService | |
{ | |
/** | |
* Return number of day in the week in an European manner, | |
* 0 is Monday, 6 is Sunday | |
* @param $unixTimestamp integer | |
* @return integer |
OlderNewer