Closed odion-cloud closed 4 years ago
Hello i want to be a able to save three colum when creating user wallet i tried like this
$wallet = $user->createWallet([ 'name' => 'New Wallet', 'slug' => 'my-wallet', 'wallettype_id' => 'wallettype_id' ]);
but it only save name and slug left wallettype_id how do i do this
You need to overload the model and add a new field to the $fillable field.
$fillable
https://github.com/bavix/laravel-wallet/blob/780270c42bdb9e4a57366f45148cc83d199bfe41/src/Models/Wallet.php#L44-L52
See https://laravel.com/docs/8.x/eloquent#mass-assignment
You need to overload the model and add a new field to the $fillable field. https://github.com/bavix/laravel-wallet/blob/780270c42bdb9e4a57366f45148cc83d199bfe41/src/Models/Wallet.php#L44-L52 See https://laravel.com/docs/8.x/eloquent#mass-assignment
thanks work
Hello i want to be a able to save three colum when creating user wallet i tried like this
$wallet = $user->createWallet([ 'name' => 'New Wallet', 'slug' => 'my-wallet', 'wallettype_id' => 'wallettype_id' ]);
but it only save name and slug left wallettype_id how do i do this