Skip to content

Instantly share code, notes, and snippets.

@ganyicz
ganyicz / Customer.php
Last active June 8, 2021 14:20
Laravel Nova - relation fields
// Customer hasOne or belongsTo User
public function fields(Request $request)
{
return [
Text::make('Heslo', 'password')->onRelation('user'),
];
}
<?php
namespace App\Console\Commands\Concerns;
use React\EventLoop\Loop;
trait RunsLoop
{
protected function loop(callable $callback, float $interval, float $lifetime): void
{