Skip to content

Add controller and route#15

Open
LanaAlrayes wants to merge 11 commits intoRoduanKD:mainfrom
LanaAlrayes:Add-Support
Open

Add controller and route#15
LanaAlrayes wants to merge 11 commits intoRoduanKD:mainfrom
LanaAlrayes:Add-Support

Conversation

@LanaAlrayes
Copy link

No description provided.

Copy link
Owner

@RoduanKD RoduanKD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some changes here and there. @LanaAlrayes please fix them so I can merge this one.

*/
public function index()
{
$supports = Support::all();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use pagination and sort them by id descendingly

'title' => 'required|string|min:3|max:255',
'details' => 'required|text|min:3|max:255',
]);
$request = new Support();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Support::create instead

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and don't forget about the fillable property


public function support()
{
return $this->hasMany(Support::class);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need here to specify the column name based on the user role. and it's best to call this one tickets instead of support. (ignore this until @Aubada10 is done with roles & permissions)

$table->text('details');
$table->integer('status');
$table->foreignId('owner_id')->constrained('users');
$table->foreignId('employee_id')->constrained('users');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

employee_id must be nullable

@endforeach
</tbody>
</table>
</div>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget to add pagination links here

<p class="text-muted">Details: {{ $support->details }}</p>
</div>
</div>
</div>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll need also to have comments (ignore this until the comments pull request is ready)

@RoduanKD RoduanKD mentioned this pull request Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants