Skip to content

Instantly share code, notes, and snippets.

View fsuuaas's full-sized avatar

Sharif Uddin Ahamed fsuuaas

View GitHub Profile
//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>';
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.
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <[email protected]>
*/
/*
@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,
UPDATE table_name1
SET column1 = (
SELECT column2
FROM table_name2
WHERE table_name1.id = table_name2.id
);
@fsuuaas
fsuuaas / address.json
Created July 7, 2018 20:28 — forked from AminulBD/address.json
Bangladdesh divisions, districts and upazila list in php array and json
{
"Rajshahi": {
"Joypurhat": [
"Akkelpur",
"Joypurhat Sadar",
"Kalai",
"Khetlal",
"Panchbibi"
],
"Bogura": [
<?php if (!isset($_COOKIE['logoalert'])): ?>
<script>
$(window).on('load',function(){
$('#logoModel').modal('show');
setTimeout(function() {$('#logoModel').modal('hide');}, 10000);
});
</script>
<?php
document.onkeypress = function(e) {
if (123 == (e = e || window.event).keyCode) return !1
}, document.onmousedown = function(e) {
if (123 == (e = e || window.event).keyCode) return !1
}, document.onkeydown = function(e) {
if (123 == (e = e || window.event).keyCode) return !1
};
var message = "Sorry, right-click has been disabled";
function clickIE() {
@fsuuaas
fsuuaas / EnsureQueueListenerIsRunning.php
Created March 19, 2018 13:12 — forked from ivanvermeyen/EnsureQueueListenerIsRunning.php
Ensure that the Laravel 5.1 queue listener is running with "php artisan queue:checkup" and restart it if necessary. You can run this automatically with a cron job: http://laravel.com/docs/scheduling
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class EnsureQueueListenerIsRunning extends Command
{
/**
* The name and signature of the console command.