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
'smtp' => [ | |
'transport' => 'smtp', | |
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), | |
'port' => env('MAIL_PORT', 587), | |
'encryption' => env('MAIL_ENCRYPTION', 'tls'), | |
'username' => env('MAIL_USERNAME'), | |
'password' => env('MAIL_PASSWORD'), | |
'timeout' => null, | |
'stream' => [ | |
'ssl' => [ |
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 | |
declare(strict_types=1); | |
namespace App\Http\Middleware\Tenant; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Stancl\Tenancy\Contracts\Tenant; | |
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedByRequestDataException; | |
use Stancl\Tenancy\Middleware\IdentificationMiddleware; |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews -Indexes | |
</IfModule> | |
RewriteEngine On | |
#extra start | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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
//js function to change iframe markup into a shortcode | |
function iFrameFilterInSummernote(contents){ | |
let rawContents = contents; | |
let matches = rawContents.match(/<iframe(.+)<\/iframe>/); | |
let ifamemarkup = Array.isArray(matches) ? matches[0] : ''; | |
let srcMatches = ifamemarkup.match(/src="(.*?)"/); | |
let ifameSrc = Array.isArray(srcMatches) ? srcMatches[0] : ''; | |
return rawContents.replace(/<iframe(.+)<\/iframe>/, '{iframe} {vsrc}="'+ifameSrc.replace('src="','')+'{/iframe}'); |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
RewriteEngine On | |
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ | |
RewriteRule ^(.*) - [E=BASE:%1] | |
RewriteCond %{ENV:REDIRECT_STATUS} ^$ | |
RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] |
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
Session::get('key'); | |
Session::get('key', 'default'); | |
Session::get('key', function(){ return 'default'; }); | |
Session::put('key', 'value'); | |
Session::all(); | |
Session::has('key'); | |
Session::forget('key'); | |
Session::flush(); | |
Session::regenerate(); | |
Session::flash('key', 'value'); |
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
Cache::put('key', 'value', $minutes); | |
Cache::add('key', 'value', $minutes); | |
Cache::forever('key', 'value'); | |
Cache::remember('key', $minutes, function(){ return 'value' }); | |
Cache::rememberForever('key', function(){ return 'value' }); | |
Cache::forget('key'); | |
Cache::has('key'); | |
Cache::get('key'); | |
Cache::get('key', 'default'); | |
Cache::get('key', function(){ return 'default'; }); |
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
Form::open(array('url' => 'foo/bar', 'method' => 'PUT')); | |
Form::open(array('route' => 'foo.bar')); | |
Form::open(array('route' => array('foo.bar', $parameter))); | |
Form::open(array('action' => 'FooController@method')); | |
Form::open(array('action' => array('FooController@method', $parameter))); | |
Form::open(array('url' => 'foo/bar', 'files' => true)); | |
Form::close(); | |
Form::token(); | |
Form::model($foo, array('route' => array('foo.bar', $foo->bar))); |
NewerOlder