Download the PHP package trendsoft/laravel-bookmark without Composer
On this page you can find all versions of the php package trendsoft/laravel-bookmark. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download trendsoft/laravel-bookmark
More information about trendsoft/laravel-bookmark
Files in trendsoft/laravel-bookmark
Package laravel-bookmark
Short Description Laravel bookmark
License MIT
Homepage https://www.trendsoft.org
Informations about the package laravel-bookmark
Laravel bookmark
User bookmark feature for Laravel Application.
Installing
Configuration
This step is optional
Migrations
This step is also optional, if you want to custom bookmarks table, you can publish the migration files:
Usage
Traits
Trendsoft\LaravelBookmark\Traits\Bookmarker
Trendsoft\LaravelBookmark\Traits\Bookmarkable
API
Get user bookmarks with pagination:
Get object bookmarkers:
with pagination:
Aggregations
List with *_count
attribute:
N +1 issue
To avoid the N+1 issue, you can use eager loading to reduce this operation to just 2 queries. When querying, you may specify which relationships should be eager loaded using the with method:
Events
Event | Description |
---|---|
Trendsoft\LaravelBookmark\Events\Bookmarked |
Triggered when the relationship is created. |
Trendsoft\LaravelBookmark\Events\Unbookmarked |
Triggered when the relationship is deleted. |
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT