month.'-01')->monthName ?? 'Ýanwar'; } /** * Create a new lens instance. * * @param \Illuminate\Database\Eloquent\Model|null $resource * @return void */ public function __construct($resource = null, string $month = '01') { $this->resource = $resource ?: new stdClass; $this->month = $month; } /** * Get the query builder / paginator for the lens. * * @param \Laravel\Nova\Http\Requests\LensRequest $request * @param \Illuminate\Database\Eloquent\Builder $query * @return mixed */ public static function query(LensRequest $request, $query) { $query->with('branch', 'paymentItems'); return $request->withOrdering($request->withFilters( $query )); } /** * Get the fields available to the lens. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return array */ public function fields(NovaRequest $request): array { return VisaMasterPaymentOrderFieldsForIndex::make($this, $this->month); } /** * Get the cards available on the lens. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return array */ public function cards(NovaRequest $request): array { return []; } /** * Get the filters available for the lens. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return array */ public function filters(NovaRequest $request): array { return []; } /** * Get the actions available on the lens. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return array */ public function actions(NovaRequest $request): array { return parent::actions($request); } /** * Get the URI key for the lens. * * @return string */ public function uriKey(): string { return 'visa-master-monthly-paid-'.$this->month; } }