--- Fixed ---
1. When switching rooms, will fetch new messages
2. Scrolling issues
3. Large margin on left side of content area for large width displays
4. Can now use tradition SHIFT + ENTER for new lines
5. Styled to be more attractive ??
This was due to adding the Delete Message feature and the usage of
the users groups. The auth user was re-assigned by the status response
and that response did not eager load the group relationship thus making
auth.group null.
Rules to Moderating messages:
1. Owner can mod all
2. User can mod his own message
3. is_admin group can mod messages except for Owner messages
4. Mods CAN NOT mod other mods messages
--- Issue ---
When you create a new group it never sets up any forums permissions for
that group. This was causing errors like
Trying to get property 'show_forum' of non-object ...
This is due to in code its trying to access a property of a null object,
this is fatal and cause the app to crash, this happens when the page
tries and loads permissions for that group/forum and the groups
permissions is a null object.
--- Fix ---
In the add() method of the Staff/GroupsController.php we create a
permissions object for each forum and associate it to the new groups id.
--- Views ---
When using traditional form inputs and passing that data through
the request object, you should name the inputs the same name as the
database columns. This will make it easier in code to just pass the
request data to the create/update operations.
--- Models ---
When using mass assignments like Model::create() and/or Model::update(),
we have to tell the model to not guard those columns. So by adding
`protected $guarded = ['id'];` to the Model we say Only guard the 'id'.
Also, try and avoid the `Raw` eloquent queries!
--- Controllers ---
Validation rules should be in here and not in the Model and should be
validated BEFORE the creation of the resource!
--- Reminder ---
The Model is strictly for interacting with the database.
The Controller handles the http/ajax requests
The View handles how to present the data to the users screen
The Repository/Concrete Classes are to handle the application specific
logic
This is a "Alpha" commit. Its meant for Alpha testing. Features are
still being developed.
Please note, you must setup at least a FREE account with pusher and set
the corresponding fields in you `.env` file.
In the coming commits I will introducing a fallback so that once the
FREE pusher DAILY limits are reached, it will fall back to tradiational
database pulling every 3 seconds to get new messages.
There are still features that need to be added:
1. Emoji's
2. Statuses
3. User Tagging
4. Users List
5. Delete own messages, and staff moderation
and more ...