每个Nova 资源均包含一个fields方法。此方法返回一个字段数组,每个字段通常继承了Laravel\Nova\Fields\{Field}类。Nova 提供了各种开箱即用的字段,包括文本输入、布尔、日期、文件上传、 Markdown 等多种字段。 要向资源添加字段,我们只需将它加入到资源的fields方法内。此方法会接受
Each Nova resource contains a fields method. This method returns an array of fields, which generally extend the Laravel\Nova\Fields\Field class. Nova ships with a variety of fields out of the box, including fields for text inputs, booleans, dates, file uploads, Markdown, and more....
When interacting with dependent fields, you may retrieve the current resource and related resource IDs via theresourcemethod: Copy BelongsTo::make(__('Books'),'books',Book::class),Currency::make('Price')->dependsOn('books',function(Currency$field,NovaRequest$request,FormData$formData){$bookId...
When using Stripe, the charge method accepts the amount you would like to charge in the lowest denominator of the currency used by your application. However, when using Braintree, you should pass the full dollar amount to the charge method:...
public function fields(Request $request) { return [ ID::make()->sortable(), BelongsTo::make('Invoice', 'invoice', Invoice::class), MorphTo::make('Product', 'productable')->types([ \App\Nova\Book::class, \App\Nova\Electronic::class, ]), Number::make('Quantity'), Currency::make(...
1use Laravel\Cashier\Cashier; 2 3Cashier::useCurrency('eur', '€');SubscriptionsCreating SubscriptionsTo create a subscription, first retrieve an instance of your billable model, which typically will be an instance of App\User. Once you have retrieved the model instance, you may use the new...
CASHIER_CURRENCY_LOCALE=nl_BE[!WARNING] In order to use locales other than en, ensure the ext-intl PHP extension is installed and configured on your server.Overriding Default ModelsYou are free to extend the models used internally by Cashier by defining your own model and extending the ...
Nova Version: 3.0 PHP Version: 7.4.6 Database Driver & Version: 8.0.20 MySQL Operating System and Version: Ubuntu 18.04.4 LTS Browser type and version: Chrome 83.0.4103.97 Description: After upgrading from 2.0 to 3.0 I am getting issue in the currency field ...
(/*** Hydrate the given attribute on the model based on the incoming request.* Overrides Laravel\Nova\Fields\Field::fillAttributeFromRequest()* so that we pass a good Carbon object back to the model depending on where the value came from** @param \Laravel\Nova\Http\Requests\NovaRequest $...
CASHIER_CURRENCY_LOCALE=nl_BEIn order to use locales other than en, ensure the ext-intl PHP extension is installed and configured on your server.LoggingCashier allows you to specify the log channel to be used when logging all Stripe related exceptions. You may specify the log channel using ...