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 | |
// Register these inside a service provider: | |
Blade::directive('route', function ($expression) { | |
return "<?php echo route({$expression}) ?>"; | |
}); | |
Blade::directive('routeIs', function ($expression) { | |
return "<?php if (request()->routeIs({$expression})) : ?>"; |
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
protected function attemptLogin(Request $request) | |
{ | |
$check = $this->guard()->attempt( | |
$this->credentials($request), $request->has('remember') | |
); | |
if ($check === false) | |
{ | |
$user = User::where('username','=',$request->input('username'))->first(); | |
if(isset($user)) { |
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
Files: | |
find /path/to/root -type f -exec chmod 644 {} \; | |
Folders: | |
find /path/to/root -type d -exec chmod 755 {} \; | |
.htaccess (because of Ionos) | |
modify RewriteRule ^ index.php | |
to RewriteRule ^ /index.php |
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 PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'phpdoc_indent' => true, | |
'binary_operator_spaces' => [ | |
'operators' => ['=>' => null] | |
], |
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
// Require local folder as Composer dependency | |
// whereas _package_ is a unique package ID to keep composer from overwriting existing config | |
// | |
// from within the project folder, run the following: | |
// composer-link /path/to/package package | |
// Then run composer require as usual. | |
composer-link() { | |
composer config repositories."$2" '{"type": "path", "url": "'$1'"}' --file composer.json | |
} |
NewerOlder