bashy

DevOps/Lead Developer at :)

Hire Me

Experience

1,130,920

560 Best Reply Awards

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

25th April, 2018

bashy left a reply on Overriding E() (or Any Of The Laravel Helpers) • 4 hours ago

Ha :P

You can undo your profile by looking at the source and copying the form out onto a index.html file locally and submitting the form.

bashy left a reply on Overriding E() (or Any Of The Laravel Helpers) • 5 hours ago

Yeah it's not. Loads of other things you can do though. Maybe phishing attack or something if people don't realise.

bashy left a reply on Overriding E() (or Any Of The Laravel Helpers) • 6 hours ago

Yeah didn't render server-side though which is good :)

bashy left a reply on Overriding E() (or Any Of The Laravel Helpers) • 6 hours ago

Well. I've broken my profile now on here :D

bashy left a reply on "broadcasting/auth" Returns Empty Response To Laravel Echo Over 443 (SSL) • 6 hours ago

Hmm strange. Must be something else then. Worth a try!

bashy left a reply on Export The View I'm Seeing (from DB) • 7 hours ago

Yeah maybe. I'm not to familiar with how it works but you can get the GET/POST data via request('search')

bashy left a reply on Export The View I'm Seeing (from DB) • 8 hours ago

Oh right, I just thought you were using it to pass search params via GET or something :P I don't know about that then.

bashy left a reply on Export The View I'm Seeing (from DB) • 8 hours ago

Have you got a button to export the list? You will probably need to do the same request but with an option checked to actually run the export.

bashy left a reply on How To Show Only Unique Users By Name Laravel? • 9 hours ago

groupBy() and you're done?

bashy left a reply on Export The View I'm Seeing (from DB) • 9 hours ago

Just pass the results into laravel-excel package (probably best) and map out the data and columns you need. I've already done this before and it works fine.

bashy left a reply on Prevent .env File From Been Accessed On A Server. • 9 hours ago

You can deny access to dot files with this;

<FilesMatch "^\.">
    Order allow,deny
    Deny from all
</FilesMatch>

Or if you need access to other dot files, just protect requests starting with .env. .env~swap would be caught I think.

<FilesMatch "^\.env">
    Order allow,deny
    Deny from all
</FilesMatch>

bashy left a reply on "broadcasting/auth" Returns Empty Response To Laravel Echo Over 443 (SSL) • 10 hours ago

That means it's returning false? Unauthorised.

Check you actually pass the checks in the channel for that broadcast.

bashy left a reply on Specifying A 'fallback' Driver? • 10 hours ago

Laravel does not have a fallback by default so you'd have to build this in.

bashy left a reply on How To Use Redis To Store The Sessions • 10 hours ago

If you set redis to be your session driver (.env SESSION_DRIVER=redis), it will just use redis. No need to do anything else.

bashy left a reply on Prevent .env File From Been Accessed On A Server. • 10 hours ago

Apache/nginx?

Can you not modify your web root?

bashy left a reply on Valet Start Doesn't Work • 10 hours ago

You need to update your brew PHP. They recently changed the package and how you pull it in.

brew update
brew upgrade
brew cleanup

// PHP is installed via [email protected] now. Check yours is still working and has been migrated from the upgrade command (check for php-7.1 to [email protected]

pecl install <package>

sudo <editor> /usr/local/etc/php/7.2/php.ini

extension_dir = "/usr/local/lib/php/pecl/20170718"

bashy left a reply on Laravel Framework File Permission - Security • 11 hours ago

@kendanblvnp I've updated my reply as ACLs are implemented more in Linux. See if those work better. 774 is fine. The last number is the 'public' permissions so as long as it's not 7, it's not readable and writable by other users.

24th April, 2018

bashy left a reply on Cannot Update My Data From My Edit From • 22 hours ago

@jlrdw It's like no one reads the basic docs of Laravel and comes on here for a 35 reply 10 human convo to solve it.

bashy left a reply on Cannot Update My Data From My Edit From • 23 hours ago

@rin4ik But you just said

but in controller he expects id :(

bashy left a reply on Cannot Update My Data From My Edit From • 23 hours ago

@rin4ik Doesn't matter what you call the variable in the method.

bashy left a reply on Overriding E() (or Any Of The Laravel Helpers) • 23 hours ago

But rendering from query strings? Everything database will be escaped and fine. I've tested it a lot and I can't exploit this.

bashy left a reply on Cannot Update My Data From My Edit From • 23 hours ago

This escalated quickly :P

I love just passing the model to routes

{{ route('posts.update', $post) }}

bashy left a reply on Overriding E() (or Any Of The Laravel Helpers) • 23 hours ago

I see. Do you do a lot of user input rendered on the page by the server then?

bashy left a reply on Reset Password Manually Without Email • 23 hours ago

@Philword Oh my bad. Yeah something to do with the token value then? I've not had this issue but I didn't override it all like you have.

bashy left a reply on Cannot Update My Data From My Edit From • 23 hours ago

@jlrdw He's not mass assigning, so that shouldn't be an issue?

@towhid Need more info really. A network request of this would be handy to see what you're sending to what URI.

bashy left a reply on How To Send Mail Using Gmail Account • 23 hours ago

You need to setup SMTP for gmail then. Use the gmail host, gmail port, your email, your password, and make sure you allow SMTP in settings.

There's loads of tutorials on this, please read them.

bashy left a reply on I Would Like To Learn Some Machine Learning From Jeffrey • 23 hours ago

This is cool but not really sure this is something he should focus on right now.

bashy left a reply on Overriding E() (or Any Of The Laravel Helpers) • 1 day ago

Is this to do with double encoding?

bashy left a reply on Cannot Update My Data From My Edit From • 1 day ago

Change

<form class="col-md-6" method="PUT" action="/posts">

to

<form class="col-md-6" method="POST" action="/posts">
    @method('PUT')

or

<form class="col-md-6" method="POST" action="/posts">
    <input type="hidden" name="_method" value="PUT">

Ref: https://laravel.com/docs/5.6/routing#form-method-spoofing

bashy left a reply on Strange Situation Where Site Became Unresponsive And Didn't Respond To Server Restart • 1 day ago

Where is this "Restart Server" action coming from? Forge? If Linux is frozen, it might not restart. All that most 'restart' buttons do is a soft reboot (instead of a hard reboot) so that you aren't just instantly turning your OS off.

That will fail if it's frozen or can't action it because of software. Nginx could of been causing that. See if it happens again.

bashy left a reply on Force Https • 1 day ago

@mushood I don't know Apache well enough to give you a good config or htaccess fixes but you need to do some testing and show more network results.

GET to https:// domain.com shows asset http:// domain.com/assets/img/test.jpg which I've included by using {{ asset('asset/img/test.jpg') }} etc etc

bashy left a reply on Reset Password Manually Without Email • 1 day ago

@Philword The default password reset views for Laravel auth should work fine. If you're overriding them, you probably forgot to pass the token in the view (form data).

bashy left a reply on Force Https • 1 day ago

@m-rk That's not always a good idea. I'd much rather load external resources via https even if my site is not https. Your reply also had nothing to do with this thread really. They're not loading external resources and they would of still got the same issue if the connection came through as http.

bashy left a reply on Form Submit With Post Do Nothing • 1 day ago

@rin4ik Wow it actually does. That's crazy. I've always put it at the top to make sure it overrides all.

bashy left a reply on Signed URL's With Utm Tags • 1 day ago

Forgot the link to the source in my reply :P https://github.com/laravel/framework/blob/5.6/src/Illuminate/Routing/UrlGenerator.php#L340

Yeah will need to generate that yourself. It's not really that hard, just encrypts it.

bashy left a reply on Form Submit With Post Do Nothing • 1 day ago

@rin4ik But since it's down the bottom, the die() should be caught first.

You're probably already logged in or something? Have you checked in the network tab of your browser to see if you're actually POSTing to /login?

bashy left a reply on Query Slow In Datatable • 1 day ago

Does it do pagination requests? If not, it's adding all 35k to the DOM which means the query is pulling all 35k items as well.

bashy left a reply on Signed URL's With Utm Tags • 1 day ago

Yeah the $original var gets all the input keys and checks them. Not sure why it needs to do that but utm is needed in the URL right? You can't just sign the URL with those params as well, no?

bashy left a reply on Force Https • 1 day ago

@mushood You will need to give more info on how you're supplying https to the browser via your web server. Have you also set https on your APP_URL environment var?

23rd April, 2018

bashy left a reply on Force Https • 1 day ago

@Cronix Redirecting http->https won't really solve it if Laravel is seeing http as the protocol. You'll also get mixed-content warnings if resources are having to redirect to https.

bashy left a reply on MethodNotAllowedHttpException In The Log-in • 1 day ago

Well you've used your own auth routes instead of Auth::routes() and you have your own auth methods.

I can't see your issue with that code. Some more debugging is probably needed.

bashy left a reply on Filtering Relationships By Other Relationships • 1 day ago

Regardless of if the with/whereHas works, you're still querying from category so you will get 25 categories with relationships included on all/some?

bashy left a reply on Force Https • 1 day ago

Laravel will just read and use the protocol used to access the site.

Do you use a proxy that could of sent http instead for a request? Was the asset rendered via JS or anything other than blade {{ asset() }} helper?

bashy left a reply on MethodNotAllowedHttpException In The Log-in • 1 day ago

Why did you override a lot of the default Laravel auth stuff?

MethodNotAllowed means you sent a method to a route that isn't set. For example, a GET to a POST.

Does it actually work with capitals? Route::GET() as you've put?

bashy left a reply on Force View On Specific User When A HTTP GET Is Fired In The Background • 2 days ago

Yeah so if you need to push stuff to the client without requesting URLs every X seconds, broadcasting it to the client is fast.

For getting started, it depends how many people will be connecting. Pusher service could be useful to start then move to socket.io later on.

Laravel Echo will be a starting point. Read up on a few tutorials and you should be able to get something working.

20th April, 2018

bashy left a reply on How To Convert Mysql Qury Into Laravel Qurybuilder Or Equalant • 5 days ago

PropertyBooking::distinct()
    ->where('end_date' '<' '2018-04-13')
    ->where('start_date' '>' '2018-04-21')
    ->get();

bashy left a reply on Force View On Specific User When A HTTP GET Is Fired In The Background • 5 days ago

WebSockets best for this?

bashy left a reply on Problem Importing Data Into Mysql Table Column - General Error: 1366 Incorrect String Value • 5 days ago

Depends on how the data was stored/exported originally I think.

19th April, 2018

bashy left a reply on Job Within A Job Doesn't Get Dispatched • 6 days ago

Yeah if you're changing files, you need to run php artisan queue:restart to get the new code changes. This is the same for horizon if you're using it php artisan horizon:terminate

Edit Your Profile
Update

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