Comments (4)
@SturmB our mass-delete functionality is located in every index.blade.php file, like this:
@can('project_delete')
@if ( request('show_deleted') != 1 ) window.route_mass_crud_entries_destroy = '{{ route('admin.projects.mass_destroy') }}'; @endif
@endcan
Then in your routes/web.php
file you should have something like this:
Route::post('projects_mass_destroy', ['uses' => 'Admin\ProjectsController@massDestroy', 'as' => 'projects.mass_destroy']);
Not sure which part you have changed/deleted, but I hope these tips will help.
from laravel-roles-permissions-bouncer.
That's a little different from the equivalent files shown in this repo, but essentially the same. I'll try cloning a fresh copy from this repo and seeing how it works without changing anything, but I'm pretty sure I haven't changed much. If you have the time and inclination, please feel free to have a quick look at my project and I'm sure you will be able to spot the problem long before I can.
Again, I am sorry for being such a pain about this. I'm doing the best I can to learn this in the relatively short time frame I was given. Thank you.
from laravel-roles-permissions-bouncer.
@SturmB sorry, my example wasn't from this exact repo, rather from our general QuickAdminPanel generator.
I've looked at your repo and it seems that you've changed the structure of how JavaScript is loaded.
So in file resources/views/admin/users/index.blade.php
instead of our @section('javascript')
you now have @push('scripts_bottom')
so now I cannot easily understand how those scripts are loaded, I would guess that it's not in a correct order, so mass-delete functionality doesn't "catch" that mass-delete route variable.
I'm afraid that's all I can help you in 5-minute time I have, without actually installing your project and debugging. Sorry, our tool is aimed at Laravel developers (with purpose to save their time), not so much for learners.
from laravel-roles-permissions-bouncer.
I would guess that it's not in a correct order, so mass-delete functionality doesn't "catch" that mass-delete route variable.
Bingo.
Actually, it pointed me in the right direction. There were probably two issues at play (not sure if the first is as important as the second):
- The
window.route_mass_crud_entries_destroy = '{{ route('users.mass_destroy') }}';
script line was not being called last - I had neglected to include the
window._token = '{{ csrf_token() }}';
script line before it.
As far as the @push…@endpush
and their corresponding @stack
directives go, they pretty much work very similar to the @section…@endsection
and their corresponding @yield
directives. From what I learned when reading the docs, the only difference is that @push
blocks add to a @stack
area, whereas @section
blocks replace whatever was previously in the same-named @yield
area. Thus, @push/@stack
is more ideal for css and javascript includes, especially if you have many nested blade templates with each one calling for their own css/js files.
Anyway, thank you so much for making this awesome starter template for bouncer! It has greatly helped and given me a much-needed head start on my project! (Feel free to close this issue.)
from laravel-roles-permissions-bouncer.
Related Issues (10)
- update method in RolesController does not work HOT 1
- Role update not working
- login route not found HOT 1
- Where do I edit the translation ( trans() ) keys? HOT 1
- Post optimize script fails on composer update HOT 1
- Parmission Edit error???? HOT 1
- Is require to create separate table for client and their members? HOT 2
- ActionsTemplate
- ErrorException
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-roles-permissions-bouncer.