Skip to content

Flasher for blade rendering validation errors #86

@wcaaan

Description

@wcaaan

Hey can you please update the documentation about how to pass the flasherInterface from view to show my validation errors, i tried checking out the blade documentation but its empty. appreciate the help.

I've created an error blade file which will render my validation errors, for now I'am using Flasher Facade, is there a better way to do this.

<?php
	use Flasher\Laravel\Facade\Flasher;
?>
    @if(isset($errors) && count($errors) > 0)
		@foreach($errors->all() as $error)
			<strong>@php Flasher::addError($error) @endphp</strong>
		@endforeach
	@endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions