Laravel Community Tools by Tighten

Tag "models" tricks

58 tricks
how can access all the posts belongs to a specific tag someone please explain.
Shashank 9 years ago 6536
X-editable allows you to create editable elements on your page. It can be used with any engine (bootstrap, jquery-ui, jquery only) and includes both popup and inline modes. Let's have a quick look at implementing this in Laravel apps.
baqirfaroo... 9 years ago 13134
If you need to sprinkle in some caching without building a bunch of Repositories. I've found this base Model and Service Provider very helpful. For updates: https://gist.github.com/danrichards/de22efa41b533d81fa1ec15f42cf64f5
danrichard... 9 years ago 9579
This employs Eloquent's polymorphic relationships (https://laravel.com/docs/5.1/eloquent-relationships#polymorphic-relations) to provide a simple flat comment thread system.
Riari 9 years ago 12576
If you want to use(or work with) another database in a section of your project use following steps... step 1. Create another connection in config/database.php step 2. Insert new connection info in .env file... step 3. Tell to laravel to use this new connection
tuytoosh 9 years ago 6998
I want to use function attempt for login authenticate but i don't want send variable password * If i run code this it will show error "Undefined index: password" and this below vendor\laravel\framework\src\Illuminate\Auth\EloquentUserProvider.php public function validateCredentials(UserInterface $user, array $credentials) { $plain = $credentials['password']; return $this->hasher->check($plain, $user->getAuthPassword()); How can i do that . pls thank you
userhuman 9 years ago 9161
This is a short video series in two parts about how you can setup different user roles for users in your application using Laravel. It conists of users, roles and user_role tables for this type of relationships between users and their roles. It should all be clearly explained inside of the tutorials. There are ways of improving this functionality and it is really easy to add more roles if needed, build on top of it etc. Hope it will be useful to you and if you have any questions, ask away :) https://www.youtube.com/watch?v=KMR2H6-K36E
Novica89 10 years ago 8135
Simple ACL laravel 5.2 Providers->AuthServiceProvider Register any application authentication / authorization services.
hendrilara 10 years ago 32199
Hi, I have 3 tables USER, ALBUMS, PHOTOS USER has one to many relation with ALBUMS, ALBUMS has one to many relation with photos. My relation mapping as follows
ajeeeunni 10 years ago 13466