Important article about future of the web apps

Here is a good article about the web apps and how it is going better. Mainly talking about PWA (Progressive Web App) , WEBASSEMBLY and HOUDINI

https://www.theverge.com/circuitbreaker/2018/4/11/17207964/web-apps-quality-pwa-webassembly-houdini

How to center google map to current location using javascript

To center google map to current user location using js api, you first have to make your website a HTTPS site

if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function (position) {
        var pos = {
            lat: position.coords.latitude,
            lng: position.coords.longitude
    };
    
    map.setCenter(pos);
    }, function () {
        console.log('error gis');
    });
}

more details here

Laravel storage can’t be accessed

To be able to access Storage folder, you have to create a link:

php artisan storage:link

In case your are using a shared hosting and can’t access the SSH , then you can run the phpartisan from route or controller

Artisan::call(‘cache:clear’);

Here is an example of running phpartisan from route

Route::get('artisan/command/{key?}', array(function ($key = null) {

        if ($key == "cache - clear") {
            try {
                echo' < br > php artisan cache: clear…';
                Artisan::call('cache: clear');
                echo' < br > php artisan cache: clear completed';
            } catch (Exception $e) {
                Response::make($e– > getMessage(), 500);
            }
        }
        elseif($key == "view - clear") {
            try {
                echo' < br > php artisan view: clear…';
                Artisan::call('view: clear');
                echo' < br > php artisan view: clear completed';

            } catch (Exception $e) {
                Response::make($e– > getMessage(), 500);
            }

        }elseif($key == "link") {
            try {
                echo' < br > php artisan storage link';
                Artisan::call('storage:link');
                echo' < br > php artisan storage:link completed';

            } catch (Exception $e) {
                Response::make($e– > getMessage(), 500);
            }

        }else {
            App::abort(404);
        }

    }));

 

Also you can try running symlink() function

<?php
    $res = symlink('/home/pylonsof/public_html/darwinSource/storage/app/public','/home/pylonsof/public_html/darwin/storage');
    
    echo($res);
    echo('ok');
?><span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>