pai-sklep/resources/views/category.blade.php

28 lines
900 B
PHP
Raw Permalink Normal View History

2021-12-16 11:51:47 +01:00
@push('head')
<link rel="stylesheet" href="{{ mix("css/user.css") }}">
@endpush
@extends('layouts.app')
@section('title', "Sklep")
@section('main')
<form action="{{route("category.store")}}" method="post">
<input type="text" name="name" placeholder="nazwa" >
<button type="submit">Dodaj</button>
@csrf
</form>
@foreach($categories as $category)
<form action="{{route("category.edit", $category)}}" method="post">
<input type="text" name="name" value="{{ $category->name }}">
<button type="submit">Zatwierdź</button>
@csrf
</form>
<form action="{{route("category.destroy", $category)}}" method="post">
<button type="submit">Usuń</button>
@csrf
@method("DELETE")
</form>
@endforeach
@endsection()