Remove the guarded
array and add the fillable
instead:
protected $fillable = ['user_id', 'deal_id'];
More Related Contents:
- How do I store a custom user selected CSS template style (like wordpress visual editor)? [closed]
- Laravel – only a zero is saved to the database
- Laravel one to many relation with a one to one relation
- How to use multiple databases in Laravel
- Laravel 5 PDOException Could Not Find Driver
- Laravel migration: unique key is too long, even if specified
- Laravel: PDOException: could not find driver
- Laravel Eloquent select all rows with max created_at
- Laravel: connect to databases dynamically
- How to join three table by laravel eloquent model
- Laravel OrderBy relationship count
- Laravel 5.2 – Use a String as a Custom Primary Key for Eloquent Table becomes 0
- How to bind parameters to a raw DB query in Laravel that’s used on a model?
- SQLSTATE[HY000] [2002] A connection attempt failed.. – When attempting to connect from Local to remote server
- Setting up Laravel on a Mac php artisan migrate error: No such file or directory [duplicate]
- Laravel Migration table already exists, but I want to add new not the older
- Laravel 5.4 – Validation with Regex [duplicate]
- Laravel $q->where() between dates
- belongsToMany relationship in Laravel across multiple databases
- How Can I Set the Default Value of a Timestamp Column to the Current Timestamp with Laravel Migrations?
- Laravel nested relationships
- getting the value of an extra pivot table column laravel
- Laravel Cannot delete or update a parent row: a foreign key constraint fails
- Base table or view not found: 1146 Table Laravel 5
- How to get MySql 8 to run with laravel? [duplicate]
- Create a Insert… Select statement in Laravel
- PHP Laravel: No connection could be made because the target machine actively refused it
- How to create a database-driven multi-level navigation menu using Laravel
- Eloquent groupBy make “SQLSTATE[42000]” with valid SQL query in Laravel 5.3
- find in set in laravel ? example