bashy

DevOps/Lead Developer at :)

Hire Me

Experience

1,002,650

474 Best Reply Awards

  • Member Since 4 Years Ago
  • 740 Lessons Completed
  • 1 Favorite

9th October, 2018

bashy left a reply on Old Password Validation • 1 week ago

@yaroslawww You do know this is 2 years old and in that version it wasn't like that? Any need to reply?

25th September, 2018

bashy left a reply on Security Hardening For A Forge On Digital Ocean Setup • 3 weeks ago

Some of it is very opinionated as well. Using a firewall to only open certain ports is good but Linux is very secure itself anyway. It's mostly down to software that's installed.

Things like memcached can listen on all interfaces so people can post stuff directly to it without a password for example.

22nd August, 2018

bashy left a reply on Homestead TTFB > 2sec Issue .. Help • 1 month ago

@robjbrain Sounds like your DB server is slow - which is the biggest cause of this problem.

13th August, 2018

bashy left a reply on Class 'App\Http\Controllers\Redirect' Not Found • 2 months ago

@LearnHunter Definition of useless reply :)

8th August, 2018

bashy left a reply on How To Setup Nginx With Dnsmasq To Make It Work Like Valet On MacOS? • 2 months ago

I use this for LaraDock nginx

server {

    listen 80;
    listen [::]:80;

    server_name ~^(?<domain>[^.]+)\.(?<tld>[^.]+)$;

    root /var/www/$domain/public;
    index index.php;

    location / {
         try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_pass php-upstream;
        fastcgi_index index.php;
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        #fixes timeouts
        fastcgi_read_timeout 600;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }

    location /.well-known/acme-challenge/ {
        root /var/www/letsencrypt/;
        log_not_found off;
    }

    error_log /var/log/nginx/$domain-error.log;
    access_log /var/log/nginx/$domain-access.log;
}

6th August, 2018

bashy left a reply on How To Setup Nginx With Dnsmasq To Make It Work Like Valet On MacOS? • 2 months ago

Just follow what Valet does in this file: https://github.com/laravel/valet/blob/master/cli/Valet/DnsMasq.php

echo 'address=/.test/127.0.0.1' > /usr/local/etc/dnsmasq.conf

Here's some info for that: https://gist.github.com/ogrrd/5831371

30th July, 2018

bashy left a reply on Laravel Framework File Permission - Security • 2 months ago

@SimonEsposito That's why ACL is best since it'll allow you to set who can read/write/execute and doesn't matter about owner/group.

18th July, 2018

bashy left a reply on Error On Safari. White Blank Page • 3 months ago

Ok, worth a try :)

bashy left a reply on Error On Safari. White Blank Page • 3 months ago

Is this a polyfill issue? https://polyfill.io

bashy left a reply on Cannot Migrate Database • 3 months ago

What MySQL server version you using? They've changed the authentication method in newer versions and it's not great.

27th June, 2018

bashy left a reply on To Send Multiple PDF Attachment In Single Mail • 3 months ago

Can't use attachData if it's a file. You can't actually use a http link either. You should use the public_path('assets/img/form.pdf') way.

bashy left a reply on To Send Multiple PDF Attachment In Single Mail • 3 months ago

Just do another $message->attach() method...?

26th June, 2018

bashy left a reply on Return Year Count Even When Count Is 0 • 3 months ago

@Artak I'm guessing some months won't have values in the database so they need to fill 2000, 2001, 2002 etc that don't have values.

bashy left a reply on Return Year Count Even When Count Is 0 • 3 months ago

Could you do an array of the years and array_fill?

bashy left a reply on Retrieve Username Based On Id In Users Table • 3 months ago

Yeah guess you would need that.

bashy left a reply on Signature Pad • 3 months ago

Look at the jsfiddle link then.

bashy left a reply on Retrieve Username Based On Id In Users Table • 3 months ago

@wilk_randall You probably want the $table->primary() to be $table->index()?

bashy left a reply on To Send Multiple PDF Attachment In Single Mail • 3 months ago

Where are the files you want to attach?

bashy left a reply on How To Escape Double Curly Braces In A Blade Template? • 3 months ago

@RoboRobok Well hopefully anpel hasn't had a bug in their code for a year+

Better late than never I guess.

bashy left a reply on Signature Pad • 3 months ago

Yeah well, after that code you need your customised stuff for how you're saving it. You said you already know how to save it?

https://jsfiddle.net/aq9Laaew/56575/

bashy left a reply on Signature Pad • 3 months ago

You'll need to show some code and some sort of screenshot so we can see.

25th June, 2018

bashy left a reply on Signature Pad • 3 months ago

All you do is add an input and use the provided JS?

<div id="signature-pad" class="m-signature-pad">
    <div class="m-signature-pad--body">
        <canvas style="border: 2px dashed #ccc"></canvas>
    </div>

    <div class="m-signature-pad--footer">
        <button type="button" class="btn btn-sm btn-secondary" data-action="clear">Clear</button>
        <button type="button" class="btn btn-sm btn-primary" data-action="save">Save</button>
    </div>
</div>


<script>
    $(function () {
        var wrapper = document.getElementById("signature-pad"),
        clearButton = wrapper.querySelector("[data-action=clear]"),
        saveButton = wrapper.querySelector("[data-action=save]"),
        canvas = wrapper.querySelector("canvas"),
        signaturePad;

        // Adjust canvas coordinate space taking into account pixel ratio,
        // to make it look crisp on mobile devices.
        // This also causes canvas to be cleared.
        window.resizeCanvas = function () {
            var ratio =  window.devicePixelRatio || 1;
            canvas.width = canvas.offsetWidth * ratio;
            canvas.height = canvas.offsetHeight * ratio;
            canvas.getContext("2d").scale(ratio, ratio);
        }

        resizeCanvas();
    });
</script>

bashy left a reply on Macbook Pro Vs Any Other Laptop With Ubuntu • 3 months ago

@leonsegal Yup, thanks for the 3 year bump.

21st June, 2018

bashy left a reply on PhpMyAdmin On Forge • 3 months ago

I can't give any updates since I've not used it since. What problems you having?

19th June, 2018

bashy left a reply on How To Pass URL String As Parameter To Laravel Routing • 4 months ago

It's because you're putting a URL into a URL... you need to urlencode() it. No way around it.

bashy left a reply on Best Guides To Deploying Laravel In Sharedhosting • 4 months ago

5.6 requires >= 7.1.3 so 7.0 won't work and it's probably something like two question marks that's causing the error (because it's built for newer PHP versions).

bashy left a reply on How To Pass URL String As Parameter To Laravel Routing • 4 months ago

Well you didn't really explain much about where it was coming from.

If the user adds in the full URL to the video, you need to parse that input and take the ID after v=.

$video_id = str_after($request->input('v'), 'watch?v=');

Although having the user submit it via query string will cause it to parse it wrong (double ?v=)

bashy left a reply on How To Pass URL String As Parameter To Laravel Routing • 4 months ago

<a href="{{ url('watch', ['v' => 'youtubeId']) }}">Watch Video</a>

bashy left a reply on Is There An Easy Way To Load And Save Configs ? • 4 months ago

@hshahdoost Sure, but as soon as someone requests a page and they're not in the cache, they will be added again. You can run jobs to rebuild this on clearance I guess?

4th June, 2018

bashy left a reply on Is It Possible To Feed The Envoy.blade.php File With Data From DB ? • 4 months ago

@itsmill3rtime Have you ever thought that maybe that wasn't possible 3 years ago?

bashy left a reply on Hosting On Shared Server Best Practice • 4 months ago

@doni49 Linux is very secure by default. Obviously the more packages you install, the more security risk there is but all you have to do is install/change a few things to make it secure then it's just a matter of sudo apt upgrade for updates.

31st May, 2018

bashy left a reply on Best Practice For Mass (group) Emailing • 4 months ago

@merwinpoulose Lovely bump there ;)

18th May, 2018

bashy left a reply on Laravel 5 Validation Request, How To Handle Validation On Update? • 5 months ago

@sghimire Then put the rule of sometimes? You didn't say you wanted it to be an optional field?

16th May, 2018

bashy left a reply on Href For A Route In JavaScript • 5 months ago

How do you put the 'route'? What route?

bashy left a reply on Laravel 5 Validation Request, How To Handle Validation On Update? • 5 months ago

@sghimire You will need to do two rules for it;

protected $rules = [
    'title' => 'required|string|max:255',
    'slug' => 'required|alpha_dash|min:5|max:255|unique:posts,slug',
    'image' => 'sometimes|image',
    'category_id' => 'required|integer',
    'reports' => 'required',
    'reports.*.report_type_id' => 'required|integer'
];

15th May, 2018

bashy left a reply on Thanks And Farewell • 5 months ago

@endian Yeah something like that. It's currently built in Python and working so when I get some free time, I'll be looking into it more :)

bashy left a reply on Thanks And Farewell • 5 months ago

Yeah nodejs is fun. I've been looking at something micro for an API that I don't want to setup a web server + php on each server.

11th May, 2018

bashy left a reply on SSL Issue With Laravel On Production Server Using Apache • 5 months ago

Do you use a proxy? Laravel will write the URLs with the same protocol it reads from the server headers. If it's returning HTTP, it means it sees HTTP (usually a reverse proxy).

You will need to force the protocol to HTTPS as lostdreamer_nl stated.

bashy left a reply on Shared Hosting • 5 months ago

Did you upload the vendor folder from local? Composer caches the file paths.

10th May, 2018

bashy left a reply on Laravel 5.6 Using Laracharts. Chart Wont Render • 5 months ago

@andremac96 Maybe try the non-blade code to see if that works first?

bashy left a reply on Laravel 5.6 Using Laracharts. Chart Wont Render • 5 months ago

I see you've imported Lavacharts but using the Lava facade.

Did you add

'Lava' => Khill\Lavacharts\Laravel\LavachartsFacade::class,

into your aliases array in config/app.php?

8th May, 2018

bashy left a reply on Session Logs Out Frequently And Automatically Even When Session Is Not Idle • 5 months ago

Right, now we're getting the information we need :P

Sounds like the sessions aren't in sync and it's refreshing them all. I'm not to familiar with this setup and how Laravel would handle this so I'm not sure I can help.

bashy left a reply on Session Logs Out Frequently And Automatically Even When Session Is Not Idle • 5 months ago

Ok, thanks for the information. Do you use separate names for the redis data since you're using it for different apps? If that's what you meant by server instances.

There's quite a lot on this topic if it's at peak times. Think redis should be ok for high traffic though.

bashy left a reply on Session Logs Out Frequently And Automatically Even When Session Is Not Idle • 5 months ago

Have you got a test case for this?

Since you've tried different drivers for the session, it seems like it's application level. Are the cookie names changing? Is this without closing the browser?

bashy left a reply on Current Url Without Paging Or Page =1 • 5 months ago

{{ request()->except('page') }}

bashy left a reply on Getting The URL After Domain In Laravel • 5 months ago

Deffo segment(1)

Use the helper method though

/provinsi:gorontalo/market:pc will be provinsi:gorontalo

{{ request()->segment(1) }}

7th May, 2018

bashy left a reply on Laravel Is A Giant Waste Of Time • 5 months ago

This still going?! Some things need a 'lock' on :P

bashy left a reply on Login And Register On Same Page • 5 months ago

Have you made your own Form Request then? Have you tried {{ $errors->login->first('email') }}?

bashy left a reply on What Is The Difference Between Cache::add And Cache::put • 5 months ago

Yeah that's it.

Docs;

The add method will only add the item to the cache if it does not already exist in the cache store

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.