2020-08-04 11:21:23 +00:00
@ extends ( " admin.layout.base " )
@ extends ( " admin.layout.header " )
@ section ( " title " )
Opret Bruger Vejledning
@ endsection
@ section ( " path " )
< a href = " { { route('guides.index') }} " class = " text-white " > Opret Vejledning </ a > /
@ endsection
@ section ( " content " )
2020-08-31 08:57:26 +00:00
@ if ( auth () -> user () -> can ( 'guides.create' ))
< div class = " row align-items-center mb-2 " >
< a class = " btn btn-inline btn-sde-blue mb-0 " href = " { { route('guides.create') }} " >< img src = " { { asset('/images/icons/plus.svg') }} " alt = " Create " > Opret Bruger Vejledning </ a >
</ div >
@ endif
< table class = " tbl " >
2020-08-04 11:21:23 +00:00
< tr >
< th > Navn </ th >
2020-08-31 08:57:26 +00:00
@ if ( auth () -> user () -> can ( 'guides.edit' ))
< th style = " width: 1em; " >< img class = " w-100 " src = " { { asset('/images/icons/pencil.svg') }} " alt = " Update " ></ th >
@ endif
@ if ( auth () -> user () -> can ( 'guides.delete' ))
< th style = " width: 1em; " >< img class = " w-100 " src = " { { asset('/images/icons/trashcan.svg') }} " alt = " Delete " ></ th >
@ endif
2020-08-04 11:21:23 +00:00
</ tr >
@ foreach ( $guides as $guide )
< tr >
< td > {{ $guide -> name }} </ td >
2020-08-31 08:57:26 +00:00
@ if ( auth () -> user () -> can ( 'guides.edit' ))
< td >< a href = " { { route( " guides . edit " , [ " guide " => $guide ]) }} " >< img class = " w-100 " src = " { { asset('/images/icons/pencil-dark.svg') }} " alt = " Update " ></ a ></ td >
@ endif
@ if ( auth () -> user () -> can ( 'guides.delete' ))
< td >< form method = " post " action = " { { route( " guides . destroy " , [ " guide " => $guide ]) }} " class = " w-100 nostyle " >
@ csrf
@ method ( " delete " )
2020-08-04 11:21:23 +00:00
2020-08-31 08:57:26 +00:00
< button onclick = " return confirm('Are you sure you want to delete?'); " class = " w-100 nostyle " type = " submit " >< img class = " w-100 cursor-pointer " src = " { { asset('/images/icons/trashcan-dark.svg') }} " alt = " Delete " ></ button >
</ form >
</ td >
@ endif
2020-08-04 11:21:23 +00:00
</ tr >
@ endforeach
</ table >
{{ $guides -> links () }}
@ endsection