rappasoft / laravel-boilerplate

The Laravel Boilerplate Project - https://laravel-boilerplate.com
https://rappasoft.com
5.59k stars 1.58k forks source link

Current Status #399

Closed rappasoft closed 8 years ago

rappasoft commented 8 years ago

I've obviously have had trouble finding time to work on this project, which sucks because I really enjoy this project.

My plan is to scrap v3 for now, and take all the work i've done and implement it in v2.

I'll probably make a legacy branch like I did for 5.1, because I plan on removing the CRUD screens for permission management, since there is no real world use for it, and instead just use a seed file for managing that.

I recently used the access part for a different project and it works well without it, theres never a need to update permission names on the go since they are hard coded into the backed code. Users/Roles management will remain the same.

I also had a lot of bug fixes in v3 I found, which i'll implement.

I believe I will need this boilerplate for a new project of my own soon, so I will have time to work on it in preparation for that.

Stay tuned and thanks for the ongoing support!

poseso commented 8 years ago

Thanks for this great project! I look forward to see those bug fixes and changes.. :)

rappasoft commented 8 years ago

Development branch is stable with the removal of permissions/dependencies views and functionality. So many classes and files removed, yet the same result and less to manage.

rappasoft commented 8 years ago

Also added a session timeout middleware that when enabled and given a value will auto log the user out after x seconds in inactivity.

rappasoft commented 8 years ago

Gonna literally go through every single line of code and clean it up as perfectly as I can, and throw in a few more surprise features before I release it and make it the new master. Stay tuned.

rappasoft commented 8 years ago

screencapture-l5boilerplate-dev-admin-access-users-1467434156446

Datatables are here.

shinnlu commented 8 years ago

seems permission are hide somewhere

rappasoft commented 8 years ago

Permission management is gone. Only in seeders now.

Theres no reason to make permissions on the fly because they need to be hard coded at runtime to do anything. So now you just keep track easily in the seeder.

App still lets you attach them to roles and such.

rappasoft commented 8 years ago

I've made a modular history class that lets you log anything you want with a simple API:

screencapture-l5boilerplate-dev-admin-access-users-1467736961733

All default functionality will come out of the box as an example.

rappasoft commented 8 years ago

Currently controlled with an event subscriber class per model to keep it neat, but you'll be able to call the global history() helper anywhere to log whatever you want.

You can display all history (global history), history per type (User, Role), history per entity (User id of 1).

Currently it supports up to 3 routes per history item if you wanted to link the items in the history text to their entities if they had show methods or something.

digitalit commented 8 years ago

When to you think the dev version is ok to upgrade to? All my created permissions in my db wont be affected by the removal of the "on the fly part" regarding permissions they will work as they do now right?

rappasoft commented 8 years ago

They won't but I wasn't planning on people to upgrade to this version, it's a massive overhaul, but if you want to spend the time it shouldn't effect anything, there might be one or two database changes but the migrations shouldn't break what's there.

The permission stuff as of now is pretty solid, i'm just adding new features.

digitalit commented 8 years ago

ok, so you recommend waiting with updating the BP?

rappasoft commented 8 years ago

It would be wise, it's going to take you a long time if you want to go that route. It shouldn't be much longer before I release it as is because i'm running out of time to work on it before my new projects start again.

digitalit commented 8 years ago

ok, thank you so much. Still haven't found any project even close to yours :)

rappasoft commented 8 years ago

Thats good! I use this for the starting point of all of my projects. I'm adding features like history that I know I implement on all of my projects.

egdavid commented 8 years ago

Any chance to add a "log-in as" button in the back-end so admins can use users accounts without knowing their credentials?

rappasoft commented 8 years ago

Like in spark? So you can see it as the user sees?

egdavid commented 8 years ago

Yep exactly! Did that on another project, I used the sessions to achieve it.

rappasoft commented 8 years ago

Example?

egdavid commented 8 years ago

I don't have the code close but I did something like:

By pushing a button, the admin throws the following methods: $request->session()->put('admin_userid', $user->id); // current user id is saved Auth::loginUsingId($newuser->id); //targeted user id

And then we can display a floating button anywhere on the UI (frontend/backend) if the session exists: @if (session()->has('admin_userid')) **You are logged in as $user->id, get back to your admin account:** @endif // that gets the admin back to his account

And if the admin wants to go back to his own account: Auth::loginUsingId($request->session()->get('admin_userid'));

And then we destroy the saved session: $request->session()->forget('admin_userid')

This could be useful for testing purpose or debugging in some cases.

rappasoft commented 8 years ago

screencapture-l5boilerplate-dev-1467752392879

rappasoft commented 8 years ago

@arrakeen can you see if this looks pretty solid: https://github.com/rappasoft/laravel-5-boilerplate/commit/d6dc33f0ab994752a4f7028d935e37c7f223bf61

egdavid commented 8 years ago

@rappasoft Yep! Users should probably create and attach a role/permission to this functionality to make it even more solid.

rappasoft commented 8 years ago

It is, you need the manage-users permission to hit the loginAs route.

rappasoft commented 8 years ago

If anyone has a chance can they download and install the development branch and let me know what you think, play around, find bugs, etc.

Thanks!

ninjaparade commented 8 years ago

@rappasoft that's awesome!

While you're in there, something I've added a few times and think it would be a good to have for frontend\auth\events is a UserConfirmedAccount event/event handler.

I also was wondering about the login/logout events, do you tend to add more data to those events other than just the user object being passed? as of https://github.com/laravel/framework/pull/13704 the built in Session in Laravel that dispatches these events can be queued.

Just curious your thoughts?

rappasoft commented 8 years ago

Sure here: https://github.com/rappasoft/laravel-5-boilerplate/commit/8b6e761fe5da8a8f4e61487c66bb24fbfbccf1b1

@ninjaparade as for your other question no i've never had more need than the user object for those events.

ninjaparade commented 8 years ago

@rappasoft ya me either. You could just bind the \App\Listeners\Frontend\Auth\UserLoggedInListener and \App\Listeners\Frontend\Auth\UserLoggedOutListener to the Session events.

Illuminate\Auth\Events\Login and Illuminate\Auth\Events\Logout and keep deleting code from your repo šŸ’ƒ

They're fired here

https://github.com/laravel/framework/blob/5.2/src/Illuminate/Auth/SessionGuard.php#L467

https://github.com/laravel/framework/blob/5.2/src/Illuminate/Auth/SessionGuard.php#L568

rappasoft commented 8 years ago

Here's the current change/feature list:

rappasoft commented 8 years ago

I think i've changed enough thus far to govern a 3.0 tag at this point anyway. I'm going to go through all the functionality, make new screenshots, update wiki, hopefully tomorrow.

pe3udent commented 8 years ago

@rappasoft awesome project! thanks for it.

I 've found a bug: datatable's search starts every time on key press. It may be better to add a timeout?

pe3udent commented 8 years ago

Sorry, my fault https://datatables.net/reference/option/searchDelay

blomdahldaniel commented 8 years ago

@rappasoft you'r the man!

rappasoft commented 8 years ago
screen shot 2016-07-06 at 12 04 06 pm

Soon..

rappasoft commented 8 years ago

Released! Thanks for the help guys. Screenshots and wiki updated. Just have to write the docs on the new history facade.

Find and submit bugs as normal now.

dylangeorgeharbour commented 8 years ago

Well done! Keen to play with it!

Thanks for all the hard work!

rappasoft commented 8 years ago

Here are the history docs: https://github.com/rappasoft/laravel-5-boilerplate/wiki/14.-History-Management

minaung7 commented 7 years ago

Hi,Excuse me sir,May i know something.I'm using laravel boilerplate.Laravel boilerplate had contained the language setting for backend so i can change the language easily but i don't know how to change the language for my frontend web page.so please sir,Could you explain me how to do it cause i'm a new laravel beginner?Respect to Senior elder brother.So please.......