Skip to content

Instantly share code, notes, and snippets.

View fsuuaas's full-sized avatar

Sharif Uddin Ahamed fsuuaas

View GitHub Profile
UPDATE table_name1
SET column1 = (
SELECT column2
FROM table_name2
WHERE table_name1.id = table_name2.id
);
@if(!is_null(session('flash_notification')))
@foreach ((array)session('flash_notification') as $message)
@php
$message = (array)$message[0];
@endphp
<script>
var Message = <?php echo json_encode($message); ?>;
toastr.options = {
"closeButton": true,
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
/*
Step 1: Upload Everything in public_html folder
Step 2: Create folder named 'application' in public_html folder
Step 3: Move every file & folder from public_html to application folder, Please don't move 'public' folder
Step 4: Move everything from 'public' to 'public_html'
Step 5: edit index.php file in 'public_html' like https://gist.github.com/fsuuaas/e6dc4e66667d863ead13b85efc3ccc21
Step 6: clear config, clear cache
Step 6: Check Storage folder is writable.
//Clear Cache facade value:
Route::get('/clear-cache', function() {
$exitCode = Artisan::call('cache:clear');
return '<h1>Cache facade value cleared</h1>';
});
//Clear Route cache:
Route::get('/route-clear', function() {
$exitCode = Artisan::call('route:clear');
return '<h1>Route cache cleared</h1>';
Backup
-----------------------------------------------------------------------------------------------------------------------------------
Step 1: Install & Activate plugins: https://wordpress.org/plugins/all-in-one-wp-migration/
Step 2: Go [All-in-One WP Migration > Backups > Create Backup] from Your Admin Menu
Step 3: If you want to change URL, like Live server to local server, Use "Find <text> Replace with <another-text> in the database"
Example: Live: http://boipoka.org ----> Local: http://localhost/boipoka
Step 4: Export to File
Step 5: Download
Restore
Upgrade MariaDB for XAMPP
Download an installer of the latest stable version of MariaDB
Be sure all modules are stopped from the XAMPP Control Panel
Rename (xampp path)/mysql to something else (i.e. mysql-old)
Install the downloaded MariaDB to the (xampp path)/mysql
Copy the mysql-old/bin/my.ini file to mysql/bin directory
Copy all .ini and .bat files from mysql-old root to the mysql root
Copy the whole mysql-old/data/phpmyadmin directory to mysql/data
Copy the mysql-old/data/ibdata1 file to mysql/data
1 : Shutdown or Quit your XAMPP server from Xampp control panel.
2 : Download the ZIP version of MariaDB
3 : Rename the xampp/mysql folder to mysql_old.
4 : Unzip or Extract the contents of the MariaDB ZIP file into your XAMPP folder.
5 : Rename the MariaDB folder, called something like mariadb-5.5.37-win32, to mysql.
6 : Rename xampp/mysql/data to data_old.
7 : Copy the xampp/mysql_old/data folder to xampp/mysql/.
8 : Copy the xampp/mysql_old/backup folder to xampp/mysql/.
9 : Copy the xampp/mysql_old/scripts folder to xampp/mysql/.
@fsuuaas
fsuuaas / Kernel.php
Created August 27, 2018 14:39 — forked from davidrushton/Kernel.php
Laravel 5 Database Queue - Shared Hosting
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
<label for="reference">Snapshot <span>*</span></label>
<div class="dropzone" id="myDropzone"></div>
<script>
Dropzone.autoDiscover = false;
modal = $("#successModal");
form = $("#imageUploadForm");
Dropzone.options.myDropzone= {
url: '/user/request-feature-save',