Browse Source

Changes

pull/11/head
KodeStar 7 years ago
parent
commit
41850f72df
  1. 6
      app/Http/Controllers/ItemController.php
  2. 9
      public/css/app.css
  3. 2
      public/mix-manifest.json
  4. 7
      resources/assets/sass/_app.scss
  5. 4
      resources/views/app.blade.php
  6. 4
      resources/views/items/list.blade.php
  7. 2
      resources/views/welcome.blade.php

6
app/Http/Controllers/ItemController.php

@ -59,7 +59,7 @@ class ItemController extends Controller
Item::create($request->all()); Item::create($request->all());
return redirect()->route('items.index') return redirect()->route('dash')
->with('success','Item created successfully'); ->with('success','Item created successfully');
} }
@ -106,7 +106,7 @@ class ItemController extends Controller
Item::find($id)->update($request->all()); Item::find($id)->update($request->all());
return redirect()->route('items.index') return redirect()->route('dash')
->with('success','Item updated successfully'); ->with('success','Item updated successfully');
} }
@ -120,7 +120,7 @@ class ItemController extends Controller
{ {
// //
Item::find($id)->delete(); Item::find($id)->delete();
return redirect()->route('items.index') return redirect()->route('dash')
->with('success','Item deleted successfully'); ->with('success','Item deleted successfully');
} }
} }

9
public/css/app.css

@ -357,6 +357,15 @@ body {
transition: all .35s ease-in-out; transition: all .35s ease-in-out;
} }
.message-container {
width: 100%;
}
.message-container .alert {
margin: 30px;
text-align: center;
}
#app.header .appheader { #app.header .appheader {
top: 0; top: 0;
} }

2
public/mix-manifest.json

@ -1,4 +1,4 @@
{ {
"/css/app.css": "/css/app.css?id=74fa6f50c8e0638a2f2c", "/css/app.css": "/css/app.css?id=54bcdb4cb450b166634d",
"/js/app.js": "/js/app.js?id=86f37c024211b755c39e" "/js/app.js": "/js/app.js?id=86f37c024211b755c39e"
} }

7
resources/assets/sass/_app.scss

@ -92,6 +92,13 @@ body {
width: 340px; width: 340px;
transition: all .35s ease-in-out; transition: all .35s ease-in-out;
} }
.message-container {
width: 100%;
.alert {
margin: 30px;
text-align: center;
}
}
#app { #app {
&.header { &.header {
.appheader { .appheader {

4
resources/views/app.blade.php

@ -28,11 +28,14 @@
</header> </header>
<main> <main>
@if ($message = Session::get('success')) @if ($message = Session::get('success'))
<div class="message-container">
<div class="alert alert-success"> <div class="alert alert-success">
<p>{{ $message }}</p> <p>{{ $message }}</p>
</div> </div>
</div>
@endif @endif
@if (count($errors) < 0) @if (count($errors) < 0)
<div class="message-container">
<div class="alert alert-danger"> <div class="alert alert-danger">
<ul> <ul>
@foreach ($errors->all() as $error) @foreach ($errors->all() as $error)
@ -40,6 +43,7 @@
@endforeach @endforeach
</ul> </ul>
</div> </div>
</div>
@endif @endif
@yield('content') @yield('content')

4
resources/views/items/list.blade.php

@ -28,7 +28,9 @@
<td>{{ $app->url }}</td> <td>{{ $app->url }}</td>
<td class="text-center"><a href="{!! route('items.edit', $app->id) !!}" title="Edit {!! $app->title !!}"><i class="fas fa-edit"></i></a></td> <td class="text-center"><a href="{!! route('items.edit', $app->id) !!}" title="Edit {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center"> <td class="text-center">
<a href="{!! route('items.destroy', $app->id) !!}" title="Delete {!! $app->title !!}" class="confirm-delete"><i class="fa fa-trash-alt"></i></a> {!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!}
<button type="submit"><i class="fa fa-trash-alt"></i></button>
{!! Form::close() !!}
</td> </td>
</tr> </tr>
@endforeach @endforeach

2
resources/views/welcome.blade.php

@ -7,7 +7,7 @@
@endforeach @endforeach
@include('add') @include('add')
@else @else
There are currently no Applications, add one here There are currently no Applications, <a href="{{ route('items.create') }}">add one here</a>
@include('add') @include('add')
@endif @endif

Loading…
Cancel
Save