درس قبلی
Toggle Pivot Table Records

Toggle Pivot Table Records

Toggle Pivot Table Records

قسمت 8
درس بعدی

درباره این درس

In Laravel 5.3, you'll find a new toggle() method on all belongsToMany relationships. This solves the issue of needing to delete a pivot table record if it exists, or adding it if it doesn't. As an example, consider needing to toggle a user's "like" status for a post.
دیدگاه های کاربران

× در حال پاسخ به: