zenepay
How to make Table widget with merge 2 sources of data
I m trying to create a widget of summary income expenses. But incomes could come from 2 models 2 tables with different table structures. I want to create a new custom table to list daily incomes from 2 database tables in one Table widget with date sorting. Please advise how I make $table->query for this.
php
public function table(Table $table): Table
{
return $table
->query(
fn (Builder $query) =>
$query->where('user_id', auth()->id())
->orderByDesc('created_at')
->limit(5)
)
->columns([
// ...
]);
}
2 replies
Form does not revalidate after change value
I have set unique(ignoreRecord:true), when it to validate with red message the submit button is also disabled. The problem is even I have change the value of the field to unique value, but the validation does not recheck and submit button is still disabled. Please advise how I could cope this.
5 replies
How modify rule for unique() when it must be unique if another field eg group are the same?
I have a house that belongs to a villege. In the same villege house_no must be unique but in different villege house_no can be the same.
I tried to use ->unique( modifyRuleUsing: fn() =>...) but I don't know how to set this up. Please advise.
#unique #✅┊rules
4 replies
Having issues with spa() and https and logout
When put URL::forceScheme('https') in boot() in AppServiceProvider, my panel spa() does not work.
But when I remove URL::forceScheme('https') I cannot click Logout. It returns The GET method is not supported for route admin/logout. Supported methods: POST. I found that the logout function send http:// instead so it does not work with https url. Please advise how I can handdle the logout function to work, so I can remove URL::forceSechema('https') #logout #spa #https
2 replies