jackoftraits / laravel8-with-livewire

The official repo of a youtube video series in building simple content management system (CMS) using laravel 8 and livewire.
71 stars 51 forks source link

NooBs issue with setup & chat box problem #7

Open MatijaKukec opened 2 years ago

MatijaKukec commented 2 years ago

So after spending some time with (setting up) this app, I find it pretty remarkable as the app is awesome and basically open source. I wish to help you all and improve this project as this is the only way to progres TOGETHER (as in life).

SETTING uP THE APP

My personal problem with setting up the app was lack of basic knowledge of laravel, as after command git clone https://github.com/jackoftraits/laravel8-with-livewire there were some more steps to help it start. For all of you like me here is the tutorial:

"https://devmarketer.io/learn/setup-laravel-project-cloned-github-com/" How to Setup a Laravel Project You Cloned from Github.com by DevMarketer. <

For those starting the app from ground up, if having problems with tailwindcss or nodejs try to remove composer.json and/or composer.lock and/or package-lock.json. I didn't quite got my hand on it.

REGISTER A USER

After setting that I found it easy to start by entering into url the register like so: "127.0.0.1:8000/register". After registering you cannot access no of default pages, only user-permisions maybe. Next step is to add admin role to it in database manager. To see if everything works and which columns exactly I need to change use SELECT name, role FROM users; or SELECT*FROM users; query. Next change it with UPDATE users SET role = admin WHERE name = "user_you_created";

USER-PERMISSIONS

Now you can access user-permissions page at "127.0.0.1/user-permissions" (logged in of course) if it don't work delete all cookies and log in again. Now my only issue I really actually seemed to have was that I had to look for and change/comment the code for a chat-box located in code at ..._projectname/resources/views/layouts/app.blade.php. I commented out //@livewire('chat-component'), //@stack('chat-websocket'), /* connection.onclose = function () { ... } */and /*setTimeout(() => { ... } */. Because my page was refreshing periodicaly for what appeared to be a random interval of time, like every second or so, for which I was unable to set user permisions at the appropriate site as it refreshed constantly. I immediately assumed what seemed to be the problem as I saw in a glimpse in one of your videos and recognized the chat-box implemented to refresh to check for a message from a server. I propose a solution to this problem for the chat box to be implemented with ajax so it refreshes in background if it is implemented please tell me how to enable it. :smile:

Everything else is awesome, I will try to tinker with it. Awesome work, keep rocking :+1: :smile:

jackoftraits commented 2 years ago

So after spending some time with (setting up) this app, I find it pretty remarkable as the app is awesome and basically open source. I wish to help you all and improve this project as this is the only way to progres TOGETHER (as in life).

SETTING uP THE APP

My personal problem with setting up the app was lack of basic knowledge of laravel, as after command git clone https://github.com/jackoftraits/laravel8-with-livewire there were some more steps to help it start. For all of you like me here is the tutorial:

"https://devmarketer.io/learn/setup-laravel-project-cloned-github-com/" How to Setup a Laravel Project You Cloned from Github.com by DevMarketer. <

For those starting the app from ground up, if having problems with tailwindcss or nodejs try to remove composer.json and/or composer.lock and/or package-lock.json. I didn't quite got my hand on it.

REGISTER A USER

After setting that I found it easy to start by entering into url the register like so: "127.0.0.1:8000/register". After registering you cannot access no of default pages, only user-permisions maybe. Next step is to add admin role to it in database manager. To see if everything works and which columns exactly I need to change use SELECT name, role FROM users; or SELECT*FROM users; query. Next change it with UPDATE users SET role = admin WHERE name = "user_you_created";

USER-PERMISSIONS

Now you can access user-permissions page at "127.0.0.1/user-permissions" (logged in of course) if it don't work delete all cookies and log in again. Now my only issue I really actually seemed to have was that I had to look for and change/comment the code for a chat-box located in code at ..._projectname/resources/views/layouts/app.blade.php. I commented out //@livewire('chat-component'), //@stack('chat-websocket'), /* connection.onclose = function () { ... } */and /*setTimeout(() => { ... } */. Because my page was refreshing periodicaly for what appeared to be a random interval of time, like every second or so, for which I was unable to set user permisions at the appropriate site as it refreshed constantly. I immediately assumed what seemed to be the problem as I saw in a glimpse in one of your videos and recognized the chat-box implemented to refresh to check for a message from a server. I propose a solution to this problem for the chat box to be implemented with ajax so it refreshes in background if it is implemented please tell me how to enable it. 😄

Everything else is awesome, I will try to tinker with it. Awesome work, keep rocking 👍 😄

You can drop your changes, will review it, and will merge it to the Master! Thank you so much!