- closes#288
- clean controller and model
- redo validation and creation/edits of messages are handled
- fix reciever_id to receiver_id
- fix receiver relation
- add PM icon on profile
- create PM menu as a partial
- update routes
- REQUIRES `php artisan migrate`
- update Peers table (rename hash to info_hash for consistency)
- update announce and torrent controller to match new column name
- major cleanup / refactor of torrent controller
- remove torrent rules from model into controller
- cleanup torrent, peer and torrentfile models
- THIS REQUIRES `php artisan migrate`
- Torrents Layout Setting
- You can now set your default torrents layout. Then when you visit
torrents icon in side nav it will automatically goto your preferred
torrents layout. You can find this new setting on your Account Settings
page.
- The default is the original Torrent List Layout.
- requires `php artisan migrate`
- - requires `php artisan clear:all`
- now supports animated gif uploading given it is symmetrical
- add max image size configuration to image.php (Default 2MB)
- this is not the prettiest but will do until Intervention supports
animated GIF’s
--- 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