We often write if statements to check if a value is present on a request or not.
You can simplify it with the whenFilled() helper.
public function store(Request $request)
{
$request->whenFilled('status', function (string $status)) {
// Handle the provided status here.
}, function () {
// This callback runs when the status is not provided.
});
}