View RememberQueryStrings.php
<?php
namespace App\Http\Middleware;
use Closure;
class RememberQueryStrings
{
public function handle($request, Closure $next)
{
View User.php
<?php
namespace App;
use App\Scopes\WithSelects;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
View drop_all_tables_in_postgresql.php
<?php
// Select all tables from the database
$tables = DB::select("SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname='public'");
// Get array of just the table names
$tables = array_column($tables, 'tablename');
// Loop through and drop each table
// The "cascade" option is important otherwise foreign keys constraints will fail
View TrimMiddleware.php
<?php
namespace ChurchSocial\Middleware;
use Closure;
class TrimMiddleware
{
public function handle($request, Closure $next)
{
View NullMiddleware.php
<?php
namespace ChurchSocial\Middleware;
use Closure;
class NullMiddleware
{
public function handle($request, Closure $next)
{
View classes.md

By type

  • /Controllers
  • /Events
  • /Models

By topic

  • /Comments
  • /Posts
View example.php
<?php
$periods = [
[new DateTime('8AM'), new DateTime('5PM')], // 9 hours
[new DateTime('8AM'), new DateTime('5PM')], // 9 hours
[new DateTime('10AM'), new DateTime('12PM')], // 2 hours
[new DateTime('12PM'), new DateTime('5PM')], // 5 hours
[new DateTime('7PM'), new DateTime('8PM')], // 1 hour
[new DateTime('9AM'), new DateTime('4PM')], // 7 hours
];
View .env
APP_ENV=local
APP_DEBUG=true
View nginx_cache_busting.conf
location ~* '\.(?:jpg|jpeg|gif|png|ico|gz|svg|svgz|mp4|ogg|ogv|webm|htc|css|js|ttf|ttc|otf|eot|woff)$'
{
expires 1y;
add_header Cache-Control "public";
add_header "Cache-Control" "no-transform";
location ~* '(.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif)$'
{
try_files $uri $1.$2;
}
View .htaccess
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)\.(\d+)\.(css|gif|jpeg|jpg|js|png|svg)$ $1.$3 [L]
</IfModule>