How to implement laravel notifications within one website in database? - mysql

Notifications within laravel website
I'am beginner of laravel framework. So there is no one experienced laravel developers in my town. There are nobody with whom I could discuss or speak about my laravel project. It's my first laravel project. The problem is I don't know, is everything in right way what I am doing? For example, thare are 2 types of users. 1 administrator, others are ordinary users. I would like to make notifications between administrator and ordinary users within website. If administrator sends message or something, it should send to chosen user.
Now I am writing notification database. And I have notification table, there are message, user_id(to whom I send this notification) in column name data. My questions
Is it right way of making notifications within website between administrator and ordinary users? I have just show this notification by selecting user_id from column name data and show this notification in User's profile(to whom sent by administator)?
Is it possible to send notifications with question like "Are you ready? Yes No" with clickable buttons Yes No. As I understand I have to create new table with columns message, user_id, status "Yes" or "No", so when user click yes button it will change the status of this message. Is it right way what I have wrote? Can you write me your ideas or logic of realizing this things. I will be grateful to You.

Related

User specific information upon loin

I am looking to make a website whereby a user will be able to login and register. Once registered and logged in I would like for them to see a list of their own customers and carry out some functionally configured to the user (e.g send an SMS from their registered phone number).
I have seen plenty of tutorials on how to implement both login and register functionality. But I have no idea how to make the information shown be specific to each customer?
Can someone assist by pointing me in the right direction for something like this? Or even a template that may already have it done?
So fair I have been able to create a very basic site (localhost) that has a user login and registration form.
Sending SMS from website is done with paid services, you can search some of them.
User specific website is done for example by using PHP. For example you have form for registration and then save the data into a database. Next time the user comes, you offer him login form, if he logs in succesfuly, you now know who the user is and offer some content according to the user. For example (simplified) you will have a folder named "Peter" and in this folder you will have informations about Peters customers. And if Peter logs in, you offer him data from this folder.

Generate an email button to log a user into a web page without API

TLDR: Is it possible to email a login button which will open a web page and enter the appropriate user information into the username/password fields? Is it possible to embed this within an HTML button, or possibly in SQL injection? If so, where should I start my research to make this happen?
OK, so what I am tasked with is generating the billing lists for about 2000 non-technical users. Currently we use a third party billing site which does not have an API or any way to authenticate users from the URL heading. What we have been doing is using mail-merge to email users their username and password along with a link to the billing site. This is great, except that our users are... special. We get dozens of phone calls a day from elderly users who can't copy/paste the given information into the website.
What I am looking for is someone to point me in the right direction for making an email click here button that will open the web page, enter the username and password (from a CSV/XML of usernames/passwords) and click enter.
I'd even settle for opening the webpage with their credentials filled into the appropriate fields. Is there a way to do this? What is the best way to go about this?
Before we get into best practices/security, CC information isn't stored on the site, and the only user info view-able is the invoice, so security isn't a huge concern here since the users can't set their own passwords (username / password generated from static fields in another database silo).
Not looking for someone to do this project for me, but perhaps a few friendly pointers in the right direction for how to do this.
Is it possible to email a login button which will open a web page and enter the appropriate user information into the username/password fields?
Not unless either:
The website is specifically designed to allow that. Since you said it was a third party side, then you would have to ask the people who wrote it.
The site suffered from an XSS security vulerability. (Explaining how to search for one would be too broad for a SO answer, searching for one would be illegal pretty much everywhere).

Update a website that already published and always have online users?

I am going to develop an asp.net website. My problem is think that now my site is published on the internet. 100 Users are already logged to my website. And they opened customer registration form in the website. So we know that when user log to a website he is sending a get request for the specific page. Then the server is sending that page in HTML format and it destroy the page from the server side.
So think that after server sent the customer registration form to the user I am going to do a update to my website. What I am doing is removing some input fields from the customer registration form. So imagine that at the user's end he can see 10 textboxes but my updated version will only contain 5 textboxes. So now what? What is going to happen? Is this lead to an error?
I just took a small example. Think that this situation occur in the middle of a transaction.
What is the scenario that use to update a website that already published and always have online users?.
Just Recycle the Application pool, this will make a new request for the online users. Like a fresh start.

Confirmation email sent to user in vb.net to mysql database

Just want to ask if there is some way to add automatic email confirmation to vb.net website.
I want that user create new account in the website and the website sent the confirmation link to them. Only if the confirmation email is clicked the user will be able to fully register.
I know that there are ways with build in login page from vb. But I'm using my own login. Mainly becouse the database where user connect is MySql.
something like this: http://www.asp.net/web-forms/videos/authentication/implement-the-registration-verification-pattern
Any idea where to look? most of the google search links are with php or to Microsoft Sql.
Thanks in advance for any good link or solution.
Petr
basically, when an user registers the account, you generate a confirmation # (I will use GUID), then send the user an email with the confirmation link. the confirmation link is the url of the confirmation page with the confirmation # as parameter, i.e. www.mysite.com/confirmation.aspx?code={guid} . you save the confirmation code in the database with the user account table (it could be in the same table or a separated table). the user has to click the confirmation url to confirm. when confirm, you just need to check whether the code is the same as the Guid in the database.
Basically, the process is the same and it has no much relation with mySQL or SQL Server.
here is an example, although it is C#, the same process, just a little bit different syntax in code:
http://www.webreference.com/programming/asp_net/registration-confirmation-system/index.html
also
asp.net confirmation mail send link that contains a unique identifier

Facebook connect database transaction help

I am trying to implement a simple login system with facebook, but I need users to pick a username. What I was thinking was to get all the information I need from facebook, request permissions, then add the information to the database, redirect to a form asking for a username and then add that to the database, to the same entry.
I think a transaction is needed so I don't end up with any half completed database entries. But I've only ever used them on the same page, so I'm wondering if this is safe? If it fails then there is no point where I would be telling the database to roll back the changes and it would be with a transaction open.
Is this right or will it be ok?
I think you made it more complicated than it should be :)
No need to enter facebook id into database before username as you can always grab it later.
Forward user to login screen (or better just open login popup using javascript FB API)
Once user is logged in forward them to username picking page (or better do javascript popup without page redirect)
When user is entered username request the current user id from facebook on server side (by either using graph api or fql) and then if everything is ok enter this record to database.