Commit 6e225512 authored by alissonalbuquerque's avatar alissonalbuquerque
Browse files

add cruds basicos de campus curso unidades

parent 4a53ac8b
@extends('layouts.main')
@section('title', 'Campus - Create')
@section('body')
<form action="{{route('campus_store')}}" method="post">
@csrf
@method('POST')
<input type="text" name="name" id="name" placeholder="Nome">
<select name="unidade_id" id="unidade_id">
<option value="" disabled selected hidden> selecione... </option>
@foreach($unidades as $unidade)
<option value="{{ $unidade->id }}"> {{ $unidade->name }} </option>
@endforeach
</select>
<button type="submit"> Enviar </button>
</form>
@endsection
@extends('layouts.main')
@section('title', 'Campus')
@section('body')
<h1> Teste </h1>
@endsection
\ No newline at end of file
@extends('layouts.main')
@section('title', 'Curso')
@section('body')
<table class="table table-dark">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Campus</th>
</tr>
</thead>
<tbody>
@foreach($cursos as $curso)
<tr>
<th scope="row">{{ $curso->id }}</th>
<td>{{ $curso->name }}</td>
<td>{{ $curso->campus }}</td>
</tr>
@endforeach
</tbody>
</table>
@endsection
@extends('layouts.main')
@section('title', 'Unidade - Create')
@section('body')
<form action="{{ route('unidade_store') }}" method="post">
@method('POST')
@csrf
<div class="form-group">
<label for="name"> Nome </label>
<input type="text" name="name" id="name">
</div>
<button type="submit" class="btn btn-primary"> Create </button>
</form>
@endsection
@extends('layouts.main')
@section('title', 'Unidade')
@section('body')
<div>
@include('components.devcomponents.btn-create', ['route' => route('unidade_create')])
</div>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Opções</th>
</tr>
</thead>
<tbody>
@foreach($unidades as $unidade)
<tr>
<th scope="row">{{ $unidade->id}}</th>
<td>{{ $unidade->name }}</td>
<td>
@include('components.devcomponents.btn-edit', ['route' => route('unidade_edit', ['id' => $unidade->id])])
@include('components.devcomponents.btn-delete', ['route' => route('unidade_delete', ['id' => $unidade->id])])
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection
@extends('layouts.main')
@section('title', 'Unidade - Update')
@section('body')
<form action="{{ route('unidade_update', ['id' => $unidade->id]) }}" method="post">
@method('POST')
@csrf
<div class="form-group">
<label for="name"> Nome </label>
<input type="text" name="name" id="name" value="{{ $unidade->name }}">
</div>
<button type="submit" class="btn btn-primary"> Create </button>
</form>
@endsection
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment