28 lines
900 B
PHP
28 lines
900 B
PHP
|
@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()
|