Example of Blade components in phpreel/phpreel

File app/View/Components/AvailabilityForm.php (link to Github)
use Illuminate\View\Component;

class AvailabilityForm extends Component
{
    public $type;

    public $content;

    public function __construct($type, $content=null)
    {
        $this->type = $type;
        $this->content = $content;
    }

    public function render()
    {
        return view("components.$this->type.availability-form", [
            'content' => $this->content,
        ]);
    }
}
File resources/views/components/create/availability-form.blade.php (link to Github)
<div class="form-group">
    <label for="availability">Availability</label><br>

    <select name="availability" class="custom-select" onchange="updateAccess()" id="availability">
        <option value="1" @if (old('availability') != null && old('availability') == 1) selected @endif>Subscription</option>
        <option value="0" @if (old('availability') != null && old('availability') == 0) selected @endif>Free</option>
    </select>
</div>
File resources/views/components/edit/availability-form.blade.php (link to Github)
<div class="form-group">
    <label for="availability">Availability</label><br>

    <select name="availability" class="custom-select" onchange="updateAccess()" id="availability">
        <option value="1" @if ($content['premium'] == 1) selected @endif>Subscription</option>
        <option value="0" @if ($content['premium']  == 0) selected @endif>Free</option>
    </select>
</div>
File resources/views/episodes/create.blade.php (link to Github)
//
                <div class="container">
                    <div class="row">
                        <div class="col-lg-12">
                            <x-availability-form type="create"/>
                        </div>
                    </div>
                </div>
//
File resources/views/episodes/edit.blade.php (link to Github)
//
                <div class="container">
                    <div class="row">
                        <div class="col-lg-12">
                            <x-availability-form type="edit" :content="$content"/>           
                        </div>
                    </div>
                </div>
//

Additional resources on blade components: