diff --git a/composer.json b/composer.json index 8542149e9c44..2df8b9ce4a71 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,6 @@ "codedge/laravel-selfupdater": "~3.0", "composer/composer": "^1.10", "dacastro4/laravel-gmail": "^3.2", - "davejamesmiller/laravel-breadcrumbs": "5.x", "doctrine/dbal": "^2.10", "fideloper/proxy": "^4.0", "fzaninotto/faker": "^1.4", diff --git a/config/breadcrumbs.php b/config/breadcrumbs.php deleted file mode 100644 index 742db9deb271..000000000000 --- a/config/breadcrumbs.php +++ /dev/null @@ -1,74 +0,0 @@ - 'portal.ninja2020.components.breadcrumbs', - - /* - |-------------------------------------------------------------------------- - | Breadcrumbs File(s) - |-------------------------------------------------------------------------- - | - | The file(s) where breadcrumbs are defined. e.g. - | - | - base_path('routes/breadcrumbs.php') - | - glob(base_path('breadcrumbs/*.php')) - | - */ - - 'files' => base_path('routes/breadcrumbs.php'), - - /* - |-------------------------------------------------------------------------- - | Exceptions - |-------------------------------------------------------------------------- - | - | Determine when to throw an exception. - | - */ - - // When route-bound breadcrumbs are used but the current route doesn't have a name (UnnamedRouteException) - 'unnamed-route-exception' => true, - - // When route-bound breadcrumbs are used and the matching breadcrumb doesn't exist (InvalidBreadcrumbException) - 'missing-route-bound-breadcrumb-exception' => true, - - // When a named breadcrumb is used but doesn't exist (InvalidBreadcrumbException) - 'invalid-named-breadcrumb-exception' => true, - - /* - |-------------------------------------------------------------------------- - | Classes - |-------------------------------------------------------------------------- - | - | Subclass the default classes for more advanced customisations. - | - */ - - // Manager - 'manager-class' => DaveJamesMiller\Breadcrumbs\BreadcrumbsManager::class, - - // Generator - 'generator-class' => DaveJamesMiller\Breadcrumbs\BreadcrumbsGenerator::class, - -]; diff --git a/resources/views/client/create.blade.php b/resources/views/client/create.blade.php index 07f4504f27d8..05c57830c31c 100644 --- a/resources/views/client/create.blade.php +++ b/resources/views/client/create.blade.php @@ -3,9 +3,6 @@ @section('body')
- - {{ Breadcrumbs::render('clients.create') }} -
diff --git a/resources/views/client/edit.blade.php b/resources/views/client/edit.blade.php index 69b5bb816b18..4c43029f6955 100644 --- a/resources/views/client/edit.blade.php +++ b/resources/views/client/edit.blade.php @@ -4,9 +4,6 @@
- - {{ Breadcrumbs::render('clients.edit', $client) }} -
diff --git a/resources/views/client/list.blade.php b/resources/views/client/list.blade.php index 7825ec0a184e..0ab558db907f 100644 --- a/resources/views/client/list.blade.php +++ b/resources/views/client/list.blade.php @@ -10,9 +10,6 @@ @section('body') @parent
- - {{ Breadcrumbs::render('clients') }} -
diff --git a/resources/views/client/show.blade.php b/resources/views/client/show.blade.php index e258b0549562..a249d5f931d3 100644 --- a/resources/views/client/show.blade.php +++ b/resources/views/client/show.blade.php @@ -3,9 +3,6 @@ @section('body')
- - {{ Breadcrumbs::render('clients.show', $client) }} -
diff --git a/resources/views/client/vue_list.blade.php b/resources/views/client/vue_list.blade.php index e7c3fb63ec9e..1bb1101d99a7 100644 --- a/resources/views/client/vue_list.blade.php +++ b/resources/views/client/vue_list.blade.php @@ -7,8 +7,6 @@ @section('body') @parent
- - {{ Breadcrumbs::render('clients') }}
diff --git a/resources/views/dashboard/index.blade.php b/resources/views/dashboard/index.blade.php index 2d6da2e34a43..485f689e21a8 100644 --- a/resources/views/dashboard/index.blade.php +++ b/resources/views/dashboard/index.blade.php @@ -1,6 +1,4 @@
- - {{ Breadcrumbs::render('dashboard') }}
diff --git a/resources/views/portal/ninja2020/credits/index.blade.php b/resources/views/portal/ninja2020/credits/index.blade.php index 4e04c78063bf..4fde0575f82b 100644 --- a/resources/views/portal/ninja2020/credits/index.blade.php +++ b/resources/views/portal/ninja2020/credits/index.blade.php @@ -2,8 +2,6 @@ @section('meta_title', ctrans('texts.credits')) @section('header') - {{ Breadcrumbs::render('credits') }} - @if($errors->any())
@foreach($errors->all() as $error) diff --git a/resources/views/portal/ninja2020/credits/show.blade.php b/resources/views/portal/ninja2020/credits/show.blade.php index f4889ca70e85..1f5817b34a5b 100644 --- a/resources/views/portal/ninja2020/credits/show.blade.php +++ b/resources/views/portal/ninja2020/credits/show.blade.php @@ -1,10 +1,6 @@ @extends('portal.ninja2020.layout.app') @section('meta_title', ctrans('texts.credit')) -@section('header') - {{ Breadcrumbs::render('credits.show', $credit) }} -@endsection - @section('body')
diff --git a/resources/views/portal/ninja2020/dashboard/index.blade.php b/resources/views/portal/ninja2020/dashboard/index.blade.php index 75545dbf3611..4af74b165e40 100644 --- a/resources/views/portal/ninja2020/dashboard/index.blade.php +++ b/resources/views/portal/ninja2020/dashboard/index.blade.php @@ -2,8 +2,6 @@ @section('meta_title', ctrans('texts.dashboard')) @section('header') - {{ Breadcrumbs::render('dashboard') }} - @if(!empty($client->getSetting('custom_message_dashboard'))) @component('portal.ninja2020.components.message') {!! CustomMessage::client($client) diff --git a/resources/views/portal/ninja2020/gateways/stripe/add_credit_card.blade.php b/resources/views/portal/ninja2020/gateways/stripe/add_credit_card.blade.php index fae306867e16..d44e5d78de03 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/add_credit_card.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/add_credit_card.blade.php @@ -5,10 +5,6 @@ @endpush -@section('header') - {{ Breadcrumbs::render('payment_methods.add_credit_card') }} -@endsection - @section('body') @csrf diff --git a/resources/views/portal/ninja2020/gateways/stripe/credit_card.blade.php b/resources/views/portal/ninja2020/gateways/stripe/credit_card.blade.php index ae7d94cfb4cc..bebc934454ba 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/credit_card.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/credit_card.blade.php @@ -7,10 +7,6 @@ @endpush -@section('header') - {{ Breadcrumbs::render('invoices.pay_now') }} -@endsection - @section('body') @csrf diff --git a/resources/views/portal/ninja2020/invoices/index.blade.php b/resources/views/portal/ninja2020/invoices/index.blade.php index 935f6cfd4a59..e78ec1c2257b 100644 --- a/resources/views/portal/ninja2020/invoices/index.blade.php +++ b/resources/views/portal/ninja2020/invoices/index.blade.php @@ -2,15 +2,14 @@ @section('meta_title', ctrans('texts.invoices')) @section('header') - {{ Breadcrumbs::render('invoices') }} -@if($errors->any()) -
- @foreach($errors->all() as $error) -

{{ $error }}

- @endforeach -
-@endif + @if($errors->any()) +
+ @foreach($errors->all() as $error) +

{{ $error }}

+ @endforeach +
+ @endif
diff --git a/resources/views/portal/ninja2020/invoices/show.blade.php b/resources/views/portal/ninja2020/invoices/show.blade.php index 339c40c2d4c9..c902b1042b1a 100644 --- a/resources/views/portal/ninja2020/invoices/show.blade.php +++ b/resources/views/portal/ninja2020/invoices/show.blade.php @@ -6,10 +6,6 @@ @endpush -@section('header') - {{ Breadcrumbs::render('invoices.show', $invoice) }} -@endsection - @section('body') @if($invoice->isPayable() && !empty($client->getSetting('custom_message_unpaid_invoice'))) diff --git a/resources/views/portal/ninja2020/payment_methods/index.blade.php b/resources/views/portal/ninja2020/payment_methods/index.blade.php index 7ac053bdbaa4..1eb880a48c50 100644 --- a/resources/views/portal/ninja2020/payment_methods/index.blade.php +++ b/resources/views/portal/ninja2020/payment_methods/index.blade.php @@ -2,7 +2,6 @@ @section('meta_title', ctrans('texts.payment_methods')) @section('header') - {{ Breadcrumbs::render('payment_methods') }}
diff --git a/resources/views/portal/ninja2020/payment_methods/show.blade.php b/resources/views/portal/ninja2020/payment_methods/show.blade.php index e05e38b8b1b8..f3acd9904cdc 100644 --- a/resources/views/portal/ninja2020/payment_methods/show.blade.php +++ b/resources/views/portal/ninja2020/payment_methods/show.blade.php @@ -1,10 +1,6 @@ @extends('portal.ninja2020.layout.app') @section('meta_title', ucfirst($payment_method->gateway_type->name)) -@section('header') - {{ Breadcrumbs::render('payment_methods.show', $payment_method) }} -@endsection - @section('body')
diff --git a/resources/views/portal/ninja2020/payments/index.blade.php b/resources/views/portal/ninja2020/payments/index.blade.php index 990d883cf86e..47b89d34a48e 100644 --- a/resources/views/portal/ninja2020/payments/index.blade.php +++ b/resources/views/portal/ninja2020/payments/index.blade.php @@ -2,7 +2,6 @@ @section('meta_title', ctrans('texts.payments')) @section('header') - {{ Breadcrumbs::render('payments') }}
diff --git a/resources/views/portal/ninja2020/payments/show.blade.php b/resources/views/portal/ninja2020/payments/show.blade.php index acf1fa565575..4891729a408b 100644 --- a/resources/views/portal/ninja2020/payments/show.blade.php +++ b/resources/views/portal/ninja2020/payments/show.blade.php @@ -1,10 +1,6 @@ @extends('portal.ninja2020.layout.app') @section('meta_title', ctrans('texts.payment')) -@section('header') - {{ Breadcrumbs::render('payments.show', $payment) }} -@endsection - @section('body')
diff --git a/resources/views/portal/ninja2020/quotes/approve.blade.php b/resources/views/portal/ninja2020/quotes/approve.blade.php index 2e5c22644b54..a57bc53deb14 100644 --- a/resources/views/portal/ninja2020/quotes/approve.blade.php +++ b/resources/views/portal/ninja2020/quotes/approve.blade.php @@ -6,10 +6,6 @@ @endpush -@section('header') - {{ Breadcrumbs::render('quotes.approve') }} -@endsection - @section('body') @csrf diff --git a/resources/views/portal/ninja2020/quotes/index.blade.php b/resources/views/portal/ninja2020/quotes/index.blade.php index 963624d59007..05cb5ab05a0a 100644 --- a/resources/views/portal/ninja2020/quotes/index.blade.php +++ b/resources/views/portal/ninja2020/quotes/index.blade.php @@ -2,8 +2,6 @@ @section('meta_title', ctrans('texts.quotes')) @section('header') - {{ Breadcrumbs::render('quotes') }} - @if($errors->any())
@foreach($errors->all() as $error) diff --git a/resources/views/portal/ninja2020/quotes/show.blade.php b/resources/views/portal/ninja2020/quotes/show.blade.php index b2750de94c8e..41260fc96a1f 100644 --- a/resources/views/portal/ninja2020/quotes/show.blade.php +++ b/resources/views/portal/ninja2020/quotes/show.blade.php @@ -6,10 +6,6 @@ @endpush -@section('header') - {{ Breadcrumbs::render('quotes.show', $quote) }} -@endsection - @section('body') @if(!$quote->isApproved() && !empty($client->getSetting('custom_message_unapproved_quote'))) diff --git a/resources/views/portal/ninja2020/recurring_invoices/cancellation/index.blade.php b/resources/views/portal/ninja2020/recurring_invoices/cancellation/index.blade.php index 46209cfc0f5c..7db25bd78af2 100644 --- a/resources/views/portal/ninja2020/recurring_invoices/cancellation/index.blade.php +++ b/resources/views/portal/ninja2020/recurring_invoices/cancellation/index.blade.php @@ -1,9 +1,5 @@ @extends('portal.ninja2020.layout.app') -@section('header') - {{ Breadcrumbs::render('recurring_invoices.request_cancellation', $invoice) }} -@stop - @section('body')
diff --git a/resources/views/portal/ninja2020/recurring_invoices/index.blade.php b/resources/views/portal/ninja2020/recurring_invoices/index.blade.php index 2c91ec1d8748..9209813d7641 100644 --- a/resources/views/portal/ninja2020/recurring_invoices/index.blade.php +++ b/resources/views/portal/ninja2020/recurring_invoices/index.blade.php @@ -2,8 +2,6 @@ @section('meta_title', ctrans('texts.recurring_invoices')) @section('header') - {{ Breadcrumbs::render('recurring_invoices') }} -
diff --git a/resources/views/portal/ninja2020/recurring_invoices/show.blade.php b/resources/views/portal/ninja2020/recurring_invoices/show.blade.php index f0308c092a78..23581e6f5c28 100644 --- a/resources/views/portal/ninja2020/recurring_invoices/show.blade.php +++ b/resources/views/portal/ninja2020/recurring_invoices/show.blade.php @@ -1,10 +1,6 @@ @extends('portal.ninja2020.layout.app') @section('meta_title', ctrans('texts.recurring_invoice')) -@section('header') - {{ Breadcrumbs::render('recurring_invoices.show', $invoice) }} -@endsection - @section('body')
diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.php deleted file mode 100644 index 59e75d2ee9b3..000000000000 --- a/routes/breadcrumbs.php +++ /dev/null @@ -1,116 +0,0 @@ -push(trans('texts.dashboard'), route('client.dashboard')); -}); - -// Invoices -Breadcrumbs::for('invoices', function ($trail) { - $trail->push(ctrans('texts.invoices'), route('client.invoices.index')); -}); - -// Invoices > Show invoice -Breadcrumbs::for('invoices.show', function ($trail, $invoice) { - $trail->parent('invoices'); - $trail->push(sprintf('%s: %s', ctrans('texts.invoice'), $invoice->number), route('client.invoices.index', $invoice->hashed_id)); -}); - -// Recurring invoices -Breadcrumbs::for('recurring_invoices', function ($trail) { - $trail->push(ctrans('texts.recurring_invoices'), route('client.recurring_invoices.index')); -}); - -// Recurring invoices > Show recurring invoice -Breadcrumbs::for('recurring_invoices.show', function ($trail, $invoice) { - $trail->parent('recurring_invoices'); - $trail->push(sprintf('%s: %s', ctrans('texts.recurring_invoice'), $invoice->hashed_id), route('client.recurring_invoices.index', $invoice->hashed_id)); -}); - -// Recurring invoices > Show recurring invoice -Breadcrumbs::for('recurring_invoices.request_cancellation', function ($trail, $invoice) { - $trail->parent('recurring_invoices.show', $invoice); - $trail->push(ctrans('texts.request_cancellation'), route('client.recurring_invoices.request_cancellation', $invoice->hashed_id)); -}); - -// Payments -Breadcrumbs::for('payments', function ($trail) { - $trail->push(ctrans('texts.payments'), route('client.payments.index')); -}); - -// Payments > Show payment -Breadcrumbs::for('payments.show', function ($trail, $invoice) { - $trail->parent('payments'); - $trail->push(sprintf('%s: %s', ctrans('texts.payment'), $invoice->hashed_id), route('client.payments.index', $invoice->hashed_id)); -}); - -// Payment methods -Breadcrumbs::for('payment_methods', function ($trail) { - $trail->push(ctrans('texts.payment_methods'), route('client.payment_methods.index')); -}); - -// Payment methods > Show payment method -Breadcrumbs::for('payment_methods.show', function ($trail, $invoice) { - $trail->parent('payment_methods'); - $trail->push(sprintf('%s: %s', ctrans('texts.payment_methods'), $invoice->hashed_id), route('client.payment_methods.index', $invoice->hashed_id)); -}); - -// Payment methods > Create method -Breadcrumbs::for('payment_methods.add_credit_card', function ($trail) { - $trail->parent('payment_methods'); - $trail->push(ctrans('texts.add_credit_card')); -}); - -// Quotes -Breadcrumbs::for('quotes', function ($trail) { - $trail->push(ctrans('texts.quotes'), route('client.quotes.index')); -}); - -// Quotes > Show quote -Breadcrumbs::for('quotes.show', function ($trail, $quote) { - $trail->parent('quotes'); - $trail->push(sprintf('%s: %s', ctrans('texts.quotes'), $quote->hashed_id), route('client.quotes.index', $quote->hashed_id)); -}); - -// Quotes > Approve -Breadcrumbs::for('quotes.approve', function ($trail) { - $trail->parent('quotes'); - $trail->push(ctrans('texts.approve')); -}); - -// Quotes -Breadcrumbs::for('credits', function ($trail) { - $trail->push(ctrans('texts.credits'), route('client.credits.index')); -}); - -// Quotes > Show quote -Breadcrumbs::for('credits.show', function ($trail, $credit) { - $trail->parent('credits'); - $trail->push(sprintf('%s: %s', ctrans('texts.credits'), $credit->hashed_id), route('client.credits.index', $credit->hashed_id)); -}); - -// Invoices > Payment -Breadcrumbs::for('invoices.pay_now', function ($trail) { - $trail->parent('invoices'); - $trail->push(ctrans('texts.pay_now')); -}); - -// Dashboard > Client -Breadcrumbs::for('clients', function ($trail) { - $trail->parent('dashboard'); - $trail->push(trans('texts.clients'), route('clients.index')); -}); - -Breadcrumbs::for('clients.show', function ($trail, $client) { - $trail->parent('clients'); - $trail->push($client->name, route('clients.show', $client)); -}); - -Breadcrumbs::for('clients.edit', function ($trail, $client) { - $trail->parent('clients'); - $trail->push($client->name, route('clients.edit', $client)); -}); - -Breadcrumbs::for('clients.create', function ($trail) { - $trail->parent('clients'); -});