laravel-5
How do I use nl2br() in Laravel 5 Blade
You can define your own “echo format” that will be used with the regular content tags {{ … }}. The default format is e(%s) (sprintf is used to apply the formatting) To change that format call setEchoFormat() inside a service provider: public function boot(){ \Blade::setEchoFormat(‘nl2br(e(%s))’); } Now you can just use the normal echo tags: …
OAuth or JWT? Which one to use and why?
JWT is a simple authentication protocol, Oauth is an authentication framework. An experienced developer will take about a month to fully understand and implement Oauth. An experienced developer can pick up the JWT protocol in about a day of reading the specifications. So basically, it boils down to your specific use-case. If you want simple …
Laravel 5 – How Do You Catch an Mail::send() Error?
Using the root namespace \Exception did the trick. Instead of: catch(Exception $e){ // Never reached } I used: catch(\Exception $e){ // Get error here }