Laravel User Management System - laravel

This feels like a silly question only because I feel like it should be obvious or easy to find, yet I've looked everywhere. Laravel has a beautifully simply way of creating user registration,login,password resets, etc. with a simple php artisan make:auth command. It seems like there's got to be a really simple way to setup User and Role management as well. Isn't this just as common a need as Registration and Login? I've looked what seems like everywhere and I've seen posts that elude to it but haven't found anything on how to add it. I really don't want to reinvent this wheel if Laravel has already made it simple. I've played that game enough times already. Thanks in advance.

it is easy (many articles and youtube videos on how to do that), but not as simple as making the user management system. there is no artisan command to do it for you. so you gonna have to reinvent that wheel
unless you want to use a third party code.
https://github.com/Zizaco/entrust (from #halloei's comment)

Take a look at what is available in Spark and you will see that the guys at laravel have done this, however it is not in there interest to make it that easy in the basic laravel framework.
https://spark.laravel.com/
If you are willing to shell out $99 you can get your auth and a bunch of other features.

Related

Recreate a GUI for an application

im new here, lately i've tried to find a way to recreate a GUI for an application and still maintain his functionality.
Let's take SnapChat as example, i would redesing the application GUI but without editing that part of code that makes the application function.Im sorry if im not giving very specific explanations but i really don't know how to say it. Im really clueless on how to do so, and even if is possible in in the first place.
If someone could help me out it would be really apreaciate
So far i haven't tried anything bheside searching something online.
I believe you want to make a 'frontend' that looks like Snapchat and have it functioning like the real site. You will need to have a backend will all the features of Snapchat. Most websites on the internet have two parts to them - frontend and the backend. And most sites won't allow you to access their backend from other frontend for security reasons.
I personally don't use that site so I don't know about its features, but assuming it's a chat platform you will need user authentication and some way to store your messages.
You should start out with React or Vue.js, and work your way up to responsive sites like Snapchat.
A quick and easy solution would be to create an extension that changes the styling once the site loads on your machine so you don't have to code your own front-end.

CS-Cart: integrating Fishbowl

I am developing a cs-cart based website and my client wants to integrate Fishbowl into his website.
I have searched an add-on for it, but there is no one for me.
I have experience developed a simple add-on and, now I am going to build one add-on to integrate fishbowl.
Please guide me if you have solid experience on integrating fishbowl and cs-cart or another warehouse solution for cs-cart.
I don't understand why the fishbowl doesn't provide or developed the add-on for it.
Please help!
Thanks for reading!
Well, there are a few things to watch out for, and therefore a number of options.
Firstly, what does your client really want. Does he want the stock to be updated on the fly, or once a night? If the client wants to stock to be updated on the fly you will need to add some sort of post function for updating products to also execute your code. If your client wants it only once a night you could just get away by sending every product in the database (with your selected columns).
Secondly, try using object oriented code. If you are really into PHP you will know what I mean by this. Otherwise dont bother (or try learing PHP Object Oriented), though I must note that this can make your addon significantly faster.
Thirdly, use the provided dbquery function
If you have any more questions regarding this, feel free to ask.

Create a Plugin-Based System Like Wordpress With Laravel / PHP

This question has been bugging me for quite some time now, I want to create a cms, a School Mnagement System to be more specific, and what matters to me the most, is making this system plugin based, in a way that administrators can download and install plugins right through their admin panel, just like wordpress.
Now I've read about wordpress Hooks, Actions and Filters, and in all honesty i can say i'm just a little familiar with their functionality, but to apply same functionality to a Laravel App... , It's a bit hard to figure out, at least for me.
I've also searched about this question and found out that almost everyone is suggesting packages, But while packages can work great for other developers wanting to get use of the package's functionality, they can't be easily installed by a user not familiar with any programming language, And that's exactly what i want in my application.
Now what i have in my mind so far, as in Wordpress Actions and Filters, almost everything one would want to use in Wordpress theme files ( to make that piece of code flexible for adding plugin functionality ) should be called as functions, and calling that function by Wordpress do_action() is kind of a must-take path, which of course makes sense.
This way plugin developers can just call add_action() / add_filter() in their files and put their plugins into the flow of the application.
So...
Basically what I'm asking here is:
How to apply such functionality to a laravel app?
Is there an easier way than calling everything by a function like do_action()?
Should i write some kind of a file management module for downloading and updating plugins?
Again I must say that I am not very familiar with wordpress ways to achieve this kind of functionality, So I may be wrong about some of the description I mentioned above, But please, I appreciate any clarification around this subject if you can.
Thanks in advance for any insight.
*P.S. I've tried to be as clear as I possibly can about the problem, And I'm not looking for any specific method for the system I`m developing.
What i want is to know Common / Best methods ( If there is a best method ) for achieving such functionality, preferably in Laravel, but a general algorithm would still be very appreciated.
I know lots of people have the same question and are tackling with the same issue, so if you even only provide a link to a useful article it would be great.*
I have been working as a Wordpress Developer for a very long time and I also have sufficient experience in Laravel... and to be honest, making this kind of functionality is not that difficult at all.
How?
First of all, you must understand that the web app that you will be making will have all the functionalities, but they can only be enabled/disabled from the front-end (Admin Panel/Dashboard). In other words, your School Management System app is actually having all the features/functionalities pre-installed, but you are just allowing the users to enable/disable it. This is much simpler.
So, if for eg. you want to provide someone attendance management functionality, you will have to give the admin of the site, the access to enable/disable it.
Why?
Wordpress has a built-in UI for adding/updating plugins. But in Laravel, everything is code based and therefore this I believe is the simplest way to go (especially for making things in your app pluggable).
Steps
Make a site with UI etc...
Create a config and migration file which will have the names of all the plugins you are going to allow the user to enable/disable.
Make a sync command that will sync all the plugins in your app.
Use it render a page from the front-end and manage their status from the back-end (is_active etc etc...)
Now once, these plugins are active, make sure the user (say moderator, editor) has access to manage them, for which you will obviously have to create roles/permissions and use Laravel Policies for such stuff.
Lastly, only the admin will have the enabling/disabling writes and no one else.
For the other part where you want the people to perform their own functions with filters/actions. I'd say this is completely contradictory to the part where you say Installing Laravel Packages isn't easy. Well, if you would really want a developer a way into this, why not straight away ask them to make a package for your app alone? Hmmmm.... Think about it :)
But, even then, if you would like to create such a functionality, create a simple class which the user can call and user its functions to call their own functions... Something like -> SMSPlugin::do_action(). But then again, making things like updating/deleting the plugin will require you to build your own Plugin Store and ask users to upload to it. Then you'll have to make an API to constantly check for updates for all the installed plugins and blah blah.... It's a really long procedure... And I don't believe that feasible too!
Hope I answered everything. Let me know in the comments if you have any doubts :)
I know it was 2 years ago, but for now you can achieve this with laravel with some packages:
So i think the steps will be:
Create new Laravel App and add some packages for BASIC admin UI and things you will need like:
Authentication (https://laravel.com/docs/5.7/authentication)
Roles and Permissions (https://github.com/spatie/laravel-permission)
Users managment
Modules (https://nwidart.com/laravel-modules/v4/introduction)
At this point you must configure and write a UI for manage every thing from every package mentioned.
So i think this is the way or at least some try to do it in 2019 :D
Happy new year to all!
There's a package for this, it supports version 5, didn't test yet with 6:
https://github.com/oneso/laravel-plugins

How to implement authentication in ZF2

There are a couple of examples online about how to write plugins implementing authentication in Zend Framework 2, but no clear information on how to use them in an application. Does anyone have a working (complete) ZF2 app that implements a simple login screen?
Check this out:
http://blog.evan.pro/getting-started-with-the-zf2-skeleton-and-zfcuser
it's a good example of how to get the standard skeleton application to work with the zfcUser module to provide exactly what you need.
I think this will be helpful:
http://samsonasik.wordpress.com/2012/10/23/zend-framework-2-create-login-authentication-using-authenticationservice-with-rememberme/
http://framework.zend.com/manual/2.0/en/modules/zend.authentication.intro.html
Start with that....i was sailing in the same boat as you were when i started off.. I did not use zfcuser as i thought it was complicated for me to use in the small amount of time i had. But its the best way of doing it.
Check the wiki page for zfc user as well.
But you can do things really simple with zf2 authentication rather than writing your own module for it.

Is Django the Best solution for me, if so please help me

What is the easiest (and fastest) way to migrate (+-) a simple data driven "app" to a Framework that does most of the work for me (like forms, add , remove).
What I have is a simple Excel 2003 for Stock managemment.
Quite simple, 3 tables:
1 for **Information **on the product.
1 with product code, type of movemment (IN ou OUT), quantity and by who
1 with product code and the actual STOCK on that product
(I know it could be more optmised.... but I don't think it's worth it)
I was think about using DJANGO, but I don't have a lot of background on the matter(are there ways automate the process??).
Is Django better for me? Or maybe PINAX(if PINAX, what apps ?? )
P.s this will only be available in a LAN, not the web.
Evolution:
I tried to install InstantDjango, but I get this error:
Traceback (most recent call last):
File
"C:\django\Python26\Lib\site-packages\django\bin\django-admin.py", line 1 4, in
from django.core import management ImportError: No module named
django.core
If anyone knows how to solve this....
I think django would be great for this. The documentation is very good which is a huge boost in trying to learn it. Django has an almost-auto admin interface which may do most of what you want.
Other than the admin interface Django doesn't "do the work" for you, but it makes it incredibly simple. You may have to define your forms, but it does have the ability to create forms based on your models(tables).
I tried Pinax briefly but it wasn't quite right for my project. I think it may add more complexity than you want for your small project. Others might have more insight into using Pinax.
I was trying to get django setup on windows last night with no luck. So I can't help you there.
Setting up a simple DJango server is relatively easy and well documented. If you're familiar with PYthon (and even if you're not) it shouldn't take a huge amount of effort to get something going. The Django Book is an excellent resource if you want to learn or get a glimpse of how easy DJango is to use.
I've no experience with PINAX, but DJango is definitely a good solution in my experience.

Resources