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
# requires (see apache2ctl -M) : sudo a2enmod mime expires rewrite headers | |
# mime | |
AddEncoding gzip .gz | |
# expires | |
ExpiresActive On | |
ExpiresByType text/css "access plus 1 year" | |
ExpiresByType application/javascript "access plus 1 year" | |
ExpiresByType image/jpg "access plus 1 year" |
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 | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class SingletonModel extends Model | |
{ | |
protected function store($data = []) | |
{ |
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 | |
namespace App; | |
use Illuminate\Database\Eloquent\Collection; | |
class ParentChildHierarchy | |
{ | |
public static function apply($entities, $primaryKey = "id", $parentKey = "parent_id", $parentRelation = "parent", $childRelation = "children") | |
{ |
OlderNewer