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 | |
| public function scopeUnionLike($query, $name, $value) | |
| { | |
| $columns = $this->getFillable(); | |
| if (!in_array($name, $columns)) { | |
| throw new \PDOException("Column $name does not exist!"); | |
| } | |
| $subQuery = $query->toSql(); |
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 | |
| /** | |
| * Returns a list of workers. | |
| * | |
| * Generates a list of workers, optionally paginated, sorted and/or filtered. | |
| * This page requires authentication. | |
| * Request type: GET | |
| */ | |
| public function listWorkers() |
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 UserFrosting; | |
| use Illuminate\Database\Capsule\Manager as Capsule; | |
| use Illuminate\Database\Eloquent\SoftDeletes; | |
| /** | |
| * Worker Class | |
| * |
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 | |
| // suppose class FancyPost extends Post | |
| // Do things using the Post class | |
| $myPost = new Post(); | |
| Post::doSomething(); | |
| // Override | |
| Post::mapClass('FancyPost'); |
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 | |
| use Illuminate\Database\Capsule\Manager as Capsule; | |
| use Illuminate\Database\Schema\Blueprint; | |
| /** | |
| * Volunteer table | |
| */ | |
| if (!$schema->hasTable('volunteers')) { | |
| $schema->create('volunteers', function (Blueprint $table) { | |
| $table->increments('id'); |
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 UserFrosting\Sprinkle\ExtendUser\Model; | |
| use Illuminate\Database\Capsule\Manager as Capsule; | |
| use UserFrosting\Sprinkle\Account\Model\User; | |
| use UserFrosting\Sprinkle\ExtendUser\Model\Owler; | |
| class OwlerUser extends User { | |
| protected $fillable = [ |
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
| {% extends "layouts/dashboard.html.twig" %} | |
| {% block body_matter %} | |
| <table> | |
| <thead> | |
| <th>From</th> | |
| <th>Subject</th> | |
| </thead> | |
| <tbody id="email-messages-body"></tbody> |
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
| /** | |
| * uf-collection plugin. Widget for attaching/detaching related items to a single parent item (e.g. roles for a user, etc). | |
| * | |
| * === USAGE === | |
| * | |
| * uf-collection can be initialized on a div element as follows: | |
| * | |
| * $("#myCollection").ufCollection(options); | |
| * | |
| * `options` is an object containing any of the following parameters: |
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 | |
| /** | |
| * UserFrosting (http://www.userfrosting.com) | |
| * | |
| * @link https://github.com/userfrosting/UserFrosting | |
| * @copyright Copyright (c) 2013-2017 Alexander Weissman | |
| * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License) | |
| */ | |
| namespace UserFrosting\Sprinkle\Core\Model\Relations; |
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
| // Institution select | |
| form.find("select[name='institutions[]']").select2({ | |
| ajax: { | |
| url: site.uri.public + "/api/institutions", | |
| dataType: "json", | |
| delay: 250, | |
| data: function (params) { | |
| return { | |
| filters: { | |
| name : params.term |