-
-
Save OmarAssadi/8f9d0d40bc6a6e7c6e7c0ce28b3f7da9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@props([ | |
'heading', | |
'footer', | |
]) | |
@php | |
// embedded php comment | |
$stmt = $pdo->query("SELECT COUNT(price), price, product FROM orders WHERE price >= 500 | |
AND category LIKE '%film%' AND brand <> :company GROUP BY price ORDER BY price DESC LIMIT 10"); | |
stmt->bindParam(':company', 'Supremely Real Film Studio', PDO::PARAM_STR); | |
$pattern = "/(^|\W)[a-z]{3,5}-\d{3,5}($|\D)/i"; | |
echo preg_match($pattern, $row['product']); | |
while ($row = $stmt->fetch()) | |
{ | |
if (!preg_match($pattern, $row['product'])) | |
{ | |
continue; | |
} | |
echo $row['product'] . "\n" . $row['brand']; | |
} | |
@endphp | |
@for ($i = 0; $i < 10; $i++) | |
The current value is {{ $i }} | |
@endfor | |
@forelse ($users as $user) | |
<li>My name is {{ $user->name }}</li> | |
@empty | |
<p {{ $attributes->class(['border']) }}>No users</p> | |
@endforelse | |
@while (true) | |
{{-- super cool and crazy comment --}} | |
<option value="{{ $value }}"> | |
<h1 {{ $heading->attributes->class(['text-lg']) }}> | |
{{ $heading }} | |
</h1> | |
</option> | |
@endwhile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment