larabrain.com
Welcome to the LaraBrain - Localizing Faker in Laravel
http://larabrain.com/tips/localizing-faker-in-laravel
Want to learn how I built LaraBrain? Of the source code and a guide for $49! Localizing Faker in Laravel. Committed to the LaraBrain by: wjgilmore ( @wjgilmore. At July 11, 2016 6:48 pm. Faker supports a wide variety of locales, but en GB is the default. So how can you change this in your Laravel application? App Providers AppServiceProvider.php. And you'll find an empty method called. Public function register() { / }. Change this method to look like this:. Or any other of the many supported settings.
larabrain.com
Welcome to the LaraBrain - Converting a Laravel Collection to an Array
http://larabrain.com/tips/converting-a-laravel-collection-to-an-array
Want to learn how I built LaraBrain? Of the source code and a guide for $49! Converting a Laravel Collection to an Array. Committed to the LaraBrain by: wjgilmore ( @wjgilmore. At January 25, 2016 4:22 pm. This tip shows you how to convert a Laravel collection into an array. It's sometimes convenient to selectively use a Laravel collection within a drop-down list. Requires an array. While you could use the. Books = Book:lists('name', 'id');. What if you wanted to use for instance three fields from the.
larabrain.com
Welcome to the LaraBrain - Excluding Multiple PHPUnit Groups
http://larabrain.com/tips/excluding-multiple-phpunit-groups
Want to learn how I built LaraBrain? Of the source code and a guide for $49! Excluding Multiple PHPUnit Groups. Committed to the LaraBrain by: wjgilmore ( @wjgilmore. At June 24, 2016 2:24 pm. Using groups and a PHPUnit option you can wield total control over which test suites are executed. Group stripe */ class StripeTest extends TestCase { . }. With the suite group names in place, you can use PHPUnit's. Option to exclude one or several groups:. Phpunit - exclude-group stripe,acceptance. The Skype logo ...
larabrain.com
Welcome to the LaraBrain - Retrieving Laravel's Current Database Name
http://larabrain.com/tips/retrieving-laravel-s-current-database-name
Want to learn how I built LaraBrain? Of the source code and a guide for $49! Retrieving Laravel's Current Database Name. Committed to the LaraBrain by: wjgilmore ( @wjgilmore. At March 8, 2016 4:16 pm. When troubleshooting database connectivity it can be useful to log the current database name. Every once in a while I'll run into a weird issue in which I want to quickly confirm which database my Laravel application thinks it is supposed to be using. To retrieve this name you'll call the.
larabrain.com
Welcome to the LaraBrain - Selectively Disabling the Laravel Debugbar
http://larabrain.com/tips/selectively-disabling-the-laravel-debugbar
Want to learn how I built LaraBrain? Of the source code and a guide for $49! Selectively Disabling the Laravel Debugbar. Committed to the LaraBrain by: wjgilmore ( @wjgilmore. At November 12, 2015 4:32 pm. The Laravel Debugbar is an indispensable tool, but sometimes you need to disable it for certain controllers. Creating Maintainable Links with the Laravel LaravelCollective/HTML Package. Arranging Many Laravel Routes in Separate Files. Creating Sluggable URLs Using the Laravel Framework.
larabrain.com
Welcome to the LaraBrain - Selectively Enabling Middleware in a Laravel Lumen Unit Test
http://larabrain.com/tips/selectively-enabling-middleware-in-a-laravel-lumen-unit-test
Want to learn how I built LaraBrain? Of the source code and a guide for $49! Selectively Enabling Middleware in a Laravel Lumen Unit Test. Committed to the LaraBrain by: wjgilmore ( @wjgilmore. At July 28, 2016 4:37 pm. It's typical to disable middleware when running tests, but what if you want to selectively enable it? Disabling middleware when running your Lumen unit tests can be done by setting the. You can do so by adding this line to the top of your test:. Formatting Timestamps in Laravel. The Skype...
larabrain.com
Welcome to the LaraBrain - Dynamically Generating a Month Form Field and Setting a Default Value
http://larabrain.com/tips/dynamically-generating-a-month-form-field-and-setting-a-default-value
Want to learn how I built LaraBrain? Of the source code and a guide for $49! Dynamically Generating a Month Form Field and Setting a Default Value. Committed to the LaraBrain by: wjgilmore ( @wjgilmore. At March 7, 2016 2:46 pm. Small visual cues can help users complete a form faster and with fewer errors. The month expiration field will contain 12 elements ranging between 01 and 12. Rather than redundantly type out each separate. Selected" : " } { sprintf("%02d n", $num) } /option @endforeach /select.
larabrain.com
Welcome to the LaraBrain - Different solutions for ensuring a Laravel user is authenticated
http://larabrain.com/tips/different-solutions-for-ensuring-a-laravel-user-is-authenticated
Want to learn how I built LaraBrain? Of the source code and a guide for $49! Different solutions for ensuring a Laravel user is authenticated. Committed to the LaraBrain by: wjgilmore ( @wjgilmore. At November 13, 2015 2:09 pm. Laravel offers a number of different solutions for determining whether a user is authenticated. Helper and the ternary operator:. Fieldset { Auth: check()? Disabled= "disabled " } . form elements here . /fieldset. Action by using the. Finally, just to be extra careful, I use the.
SOCIAL ENGAGEMENT