Skip to content

Instantly share code, notes, and snippets.

View gr1zix's full-sized avatar
🎯
Focusing

Grizix gr1zix

🎯
Focusing
View GitHub Profile
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PostsController extends Controller
{
/**
* Base methods structure
@gr1zix
gr1zix / phpmyadmin.conf
Last active July 18, 2022 19:44
Laravel LEMP server configurations [Nginx, MySQL PhpMyAdmin, php7.2-fpm, Redis, Composer)
location /phpmyadmin {
root /usr/share/;
index index.php;
try_files $uri $uri/ =404;
location ~ ^/phpmyadmin/(doc|sql|setup)/ {
deny all;
}
location ~ /phpmyadmin/(.+\.php)$ {
@gr1zix
gr1zix / readme.md
Last active November 9, 2020 20:30
Laravel 5.5 - 5.6 - The page has expired due to inactivity when login (auth)

Title I (Part 1): Laravel Quick Tip: Handling CsrfToken Expiration gracefully

or (check what working for you)

Title II (Part 2): “The page has expired due to inactivity” - Laravel 5.5 - 5.6

Part 1

Working but it must added to app/Exceptions/Handler.php not VerifyCsrfToken.php

@gr1zix
gr1zix / readme.md
Last active October 3, 2018 18:48
Git pull Error - Your local changes to the files would be owerwritten by merge
@gr1zix
gr1zix / webpack.config.js
Last active November 5, 2018 18:55
Laravel Mix - Required jQuery plugins can't be found
mix.autoload({
jquery: ['$', 'window.jQuery',"jQuery","window.$","jquery","window.jquery"]
});
/**
* Manual: https://www.justin.ly/adding-jquery-bootstrap-plugins-laravel-5-mix/
* Source: https://laracasts.com/discuss/channels/elixir/laravel-mix-required-jquery-plugins-cant-be-found
*/
@gr1zix
gr1zix / editors.md
Created November 5, 2018 19:54
Vue JS html, text, WYSIWYG editor list
@gr1zix
gr1zix / readme.md
Created December 30, 2018 10:44
[VPS, Hosting] Services
@gr1zix
gr1zix / phpmyadmin.conf
Last active March 23, 2020 01:03
phpmyadmin
location /phpmyadmin {
#Auth
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/pma_pass;
expires modified +310s;
#Context
root /usr/share/;
@gr1zix
gr1zix / app.css
Created September 7, 2021 08:54
Elementor register custom font (Font will be listed on Elementor fonts selector)
/* Enabling font which stored on fonts/ folder */
@font-face {
font-family: 'Organetto';
src: url('fonts/Organetto-Light.eot');
src: local('Organetto Light'), local('Organetto-Light'),
url('fonts/Organetto-Light.eot?#iefix') format('embedded-opentype'),
url('fonts/Organetto-Light.woff2') format('woff2'),
url('fonts/Organetto-Light.woff') format('woff'),
url('fonts/Organetto-Light.ttf') format('truetype'),
url('fonts/Organetto-Light.svg#Organetto-Light') format('svg');
@gr1zix
gr1zix / functions.php
Last active September 13, 2021 11:02
Elementor register scripts on elementor template to overwrite the theme defaults
<?php
if (!function_exists('app_get_theme_version')) {
function app_get_theme_version() {
$theme_info = wp_get_theme();
if ( is_child_theme() ) {
$theme_info = wp_get_theme($theme_info->parent_theme);
}
$theme_version = $theme_info->display('Version');