Stop displaying list of tags on settings page
MODIFY
app/Http/Controllers/SettingsController.php
app/Http/Controllers/SettingsController.php
@@ -11,11 +11,8 @@ use Hash;
class SettingsController extends Controller {
public function index() {
- $user = Auth::user();
-
return view('settings', [
- 'languages' => config('app.locales'),
- 'tags' => $user->tags
+ 'languages' => config('app.locales')
]);
}

MODIFY
resources/views/settings.blade.php
resources/views/settings.blade.php
</form>
</div>
</div>
- <div class="my-4 color-dark">Tags</div>
- <div class="box">
- @if (count($tags))
- <ul class="box__section">
- @foreach ($tags as $tag)
- <li class="row">
- <div class="row__column">
- <div>{{ $tag->name }}</div>
- <div class="mt-1"><i class="fal fa-piggy-bank"></i> {{ $tag->spendings->count() }} {{ __('general.spendings') }}</div>
- </div>
- <div class="row__column row__column--compact">
- <a href="/tags/{{ $tag->id }}/edit">
- <i class="fas fa-pencil"></i>
- </a>
- </div>
- <div class="row__column row__column--compact ml-2">
- <form method="POST" action="/tags/{{ $tag->id }}">
- {{ method_field('DELETE') }}
- {{ csrf_field() }}
- <button class="link">
- <i class="fas fa-trash"></i>
- </button>
- </form>
- </div>
- </li>
- @endforeach
- </ul>
- @else
- <div class="box__section text-center">You don't have any tags</div>
- @endif
- <div class="box__section">
- <form method="POST" action="/tags">
- {{ csrf_field() }}
- <div class="row">
- <div class="row__column" style="max-width: 400px;">
- <input type="text" name="name" />
- @include('partials.validation_error', ['payload' => 'name'])
- </div>
- <div class="row__column row__column--compact row__column--middle ml-2">
- <button>Submit</button>
- </div>
- </div>
- </form>
- </div>
- </div>
</div>
@endsection

Stop displaying list of tags on settings page