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
<snippet> | |
<content><![CDATA[ | |
<?php | |
namespace ${1:App\Http\Controllers}; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
class ${2:My}Controller 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
<snippet> | |
<content><![CDATA[ | |
<?php | |
namespace ${1:App\Providers}; | |
use Illuminate\Support\ServiceProvider; | |
class ${2:Service}ServiceProvider extends ServiceProvider { |
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
<snippet> | |
<content><![CDATA[ | |
<?php | |
namespace ${1:App\Http\ViewComposers}; | |
use View; | |
use Illuminate\Support\ServiceProvider; | |
class ${2:My}ViewComposer extends ServiceProvider { |
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
<snippet> | |
<content><![CDATA[ | |
<?php | |
namespace ${1:App}; | |
class ${2:ClassName} { | |
${3} | |
} | |
?> |
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\Presenters; | |
use Illuminate\Pagination\BootstrapThreePresenter; | |
/** | |
* | |
* To use: | |
* |
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 paginate(url) { | |
microAjax(url, function (res) { | |
process_json(res); | |
}); | |
return false; | |
} |
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\Services; | |
class TableHeaderGenerator { | |
/** | |
* Returns an array for the table view's header data that includes sort links | |
* @param Array $data array of arrays with keys 'label' and 'col' | |
* @param string $current_sort |
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 | |
/** | |
* Conversion of the old upload_aws class from the global repo. | |
* Handles management of the AWS files, with utitilies to resize images | |
* and generate signed URLs. | |
* | |
* Utilizes aws/aws-sdk-php-laravel. Optionally add a 'bucket' key to the aws config file. | |
* | |
* @todo: Could probably extend the use of the UploadFile class beyond the constructor | |
*/ |
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
var FieldMultiplier = { | |
makeSum: function(e) { | |
/** | |
* Look for any elements with the same class as this one | |
* and sum them, multiplying by the multiplier attribute. | |
* The sum will go into the elements that match the sum attribute. | |
*/ | |
var sum = 0; | |
var sum_selector = '.'+e.getAttribute('class'); | |
var elements = document.querySelectorAll(sum_selector); |
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
var PageChangeWarning = { | |
unload_message: "You have unsaved changes on this page.", | |
display_warning: function() { | |
return this.unload_message; | |
}, | |
change_made: function() { | |
window.onbeforeunload = this.display_warning.bind(this); | |
}, | |
saved: function() { | |
window.onbeforeunload = null; |