Hi, in my kernel.php i have this code
protected function schedule(Schedule $schedule)
{
$filters = Filter::all();
foreach ($filters as $key => $filter) {
$schedule->command('filters:run' . ' ' . $filter->id)->cron($filter->interval);
}
}
but the commande si still executed every minute even if the interval is /3 *
sanctum
or passport
or any other library that helps with that?
I use laravel 8.18.1, when trying to create database using migrations
$table->unsignedTinyInteger('is_meeting',1)->default('0');
it results error, when checking the error, it shows that
'is_meeting' tinyint unsigned not null default '0' auto_increment primary key
why does it create auto_increment and primary key, eventhough I don't set it to auto_increment and primary key?
return ProductResource::collection(Product::paginate(2));
$products = Product::paginate(2);
return ProductResource::collection($products);
Hi there. I know it's a long shot, but maybe someone knows whether it's a good/bad idea to extend this method to handle SIGINT? I want to extend this method to handle terminal shutdowns, but since it's not implemented in the core I'm wondering what could be the side effects of this.
https://github.com/laravel/framework/blob/8.x/src/Illuminate/Queue/Worker.php#L641
Hello everyone. There is a item model with relation "set".
public function set(): HasOne
{
return $this->hasOne(ItemSet::class);
}
My query: Item::query()->with('set')->get()
;
The next step in the template, I go through the products, I need to understand which product has a set and which does not.
{% for item in items %}
{{ dd(item.set.exists()) }}
{% endfor %}
This case works, but generates N + 1 on exists queries. How can you avoid this?
is_null($item->set)
$path = '/'
and I now want to get the request from that. Does that make sense? I am looking for a way to get the Route which matches the uri '/' for example.