Laravel Community Tools by Tighten

Recent tricks

458 tricks
This Trait helps you to pass "variables" anywhere in controllers to "view" . you can use "$this->view->..." in controller to pass your variables , also you can use "$this->view()" same as "view()" helper with same functionality to render the view . ( this package is made by larabook.ir)
hpakdaman 10 years ago 14752
DRY (Don’t Repeat Yourself) is a key principle in software engineering. It simply states that one should not reinvent the wheel while you are writing any application. If you have written some PHP application earlier, you will find that you are reinventing the wheel again and again to write the same process, like User Authentication, Database Management, Mailing Service, Validation System, etc. However, PHP now has effective and mature frameworks in hand that can perform nearly all the basic processes as stated above with their core. In fact, if you are smart enough, only then you will cherry pick the components from other frameworks like Zend, Laravel, Symfony, etc. This is the most hectic phase where you need to keep the dependencies of the required components, or else you will create a huge mess. Here are complete tutorial: http://www.cloudways.com/blog/composer-with-laravel/
wajidstack 10 years ago 7457
with this code you can test all get page without params (index,create,etc...)
d3v2a 10 years ago 14663
In this article I'm gonna show you how to setup Laravel with Redis cache. Cloudways offers Laravel Development Framework on its Managed Cloud Web Hosting Platform. You also have the option to use Redis Cache, which is different from Memcached in the sense that it has persistence. Further advantages of Redis over Memcached are that it works with more data types, and it uses less memory. Here are the article link: http://www.cloudways.com/blog/setup-laravel-redis-cache/
wajidstack 10 years ago 8565
4.1
You can see SQL Query of your DB table on Laravel App, by Event listener.
ahaneef29 10 years ago 8250
A couple of view creators that inject variables or text into views
davestewar... 10 years ago 7225
In Laravel 5, by default you have CSRF in every single POST. If you are new to Laravel and you use the usual HTML code to create inputs and forms then you will definitely encounter that error. Also, if you are coming from Laravel 4, again you might not know how to solve this error since 'Illuminate\Html\HtmlServiceProvider' is not installed by default anymore and HTML inputs and form have to be used. There are 3 solutions in order to fix it. 1) If you want to keep the usual HTML code and not use 'Illuminate\Html\HtmlServiceProvider' (since it is not installed by default in Laravel 5), then you can delete this line of code '\App\Http\Middleware\VerifyCsrfToken::class,' in app/Http/Kernel.php. However this is not a good practice. You can still do that though, in case you are building something small or an API. 2) You can install 'Illuminate\Html\HtmlServiceProvider' and do it the old good Laravel 4 way, which uses tokens by default, thus you don't have to worry about it anymore. 3) The last solution is in case you want to code the front end with the usual HTML code then you can use this line in your layout or in case you don't have a layout then in every single page. <input type="hidden" name="_token" id="csrf-token" value="{{ Session::token() }}" /> You can get Laravel 5 tutorials and projects for all levels (Beginners-Intermediate-Advanced) in this website www.codeexecutable.com/courses
codeexecut... 10 years ago 9817
I'm having a porblem trying to solve this error.. anyone encountered this beforre?
dnates2014 10 years ago 7176
Often you have a form in your application that has a file input (logo, picture, etc...) and you would like to test it. You might have been stuck when trying to test that form, puzzled at the odd errors you got while you did used the attach() method provided in the Laravel Integrated test package. I will show you how to smoothly send a file to your server when you run your PHPUnit test suite.
MehdiSouih... 10 years ago 13158