Laravel Community Tools by Tighten

Tag "troubleshooting" tricks

35 tricks
Nginx server configuration files
yuchao 11 years ago 14285
When you need to pass some data to the Mail::send or Mail::queue, you need to make use of the "use" approach:
aglipanci 11 years ago 56027
If we have a blog, sometimes we want to display all latest posts by category. Take an example with this website where I put those posts in a carousel on the homepage: http://dadack.com
mercuryser... 11 years ago 17548
You may need this basically for security reasons. When somebody installed this plugin (https://wappalyzer.com/download) on the browser, s/he can see all the frameworks and javascript libraries among other things. Wappalyzer uses json to specify what it should be looking for. Check this GitHub Repo to understand how it identifies Laravel (https://github.com/ElbertF/Wappalyzer/blob/master/share/apps.json). So, to hide Laravel from this plugin, you need to edit the Session Cookie Name in /app/config/session.php. Change it from laravel_session to your desire name e.g: yourapp_session. Hope this helps.
amirolzolk... 11 years ago 24648
Sometimes hasColorSupport() in Symfony\Console..StreamOutput returns false even if there is color support, to make it explicitly know we must call this method before output eg. in fire()
hardevine 11 years ago 8177
I use this to always know in my controllers if the current action is shown through a Facebook tab iframe. Upon the first request this checks if there is a "signed_request" variable posted to the page. Then $fb_state is set to true and shared with all views. The problem is that on navigating to the next page within your app this variable is lost and you don't know if this is shown through facebook. Due to the FB page proxy you can't use sessions to remember this for the next request either. I solve this problem with adding "signed_request" as a parameter (i.e. "&signed_request=123ljshgljsdhflsdhfl") to every link and form when $fb_state == true. Of course you could also pass any other variable if you don't need the actual signed_request data.
flei 11 years ago 8333
Whoops, looks like something went wrong.
yuran 11 years ago 21093
If you receive any error message like below after upgrading to Laravel 4.2, you should modify your queue config: production.ERROR: Undefined index: encrypt Add 'encrypt' => true, to config of Iron
kemalyen 11 years ago 9538
Here is how to beat Laravel to the punch when the database isn't playing nice. The error codes are specific to MySQL. You can easily substitute the error codes for whatever DB you are using. Below are 2 common errors. Here's a scrrenshot of the error page plus.google.com/113701899574492909448/posts/c4oAn7FDmLj
DragonI 11 years ago 11988