I'm trying to move my project to a droplet but now a lot of stuff doesn't work that does work locally. Right now I'm trying to save a product but I'm getting this error
General error: 1364 Field 'updated_at' doesn't have a default value (SQL: insert into inventory (quantity, product_id) values (0, 6))
I don't get this locally. This is the Inventory Model
protected $table = 'inventory';
protected $primaryKey = 'product_id';
public $timestamps = false;
protected $dates = ['updated_at'];
public function setUpdatedAtAttribute($value)
{
$this->attributes['updated_at'] = now();
}
But I'm still getting this error, what could be happening?
Another thing that doesn't work is I have the option to switch between English and Spanish but this also isn't working, again it works locally.
Route::post('/lang', 'DashController@locale');
public function locale(Request $request)
{
App::setLocale($request->lang);
session()->put('locale', $request->lang);
return back();
}
I haven't been able to figure out what else isn't working.