You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 lines
627 B

<?php
namespace App\Http\Controllers\Issues;
use Illuminate\Http\Request;
use App\Entities\Projects\Issue;
use App\Http\Controllers\Controller;
class PicController extends Controller
{
public function update(Request $request, Issue $issue)
{
$picData = $request->validate([
'pic_id' => 'nullable|exists:users,id',
]);
$issue->pic_id = $picData['pic_id'];
$issue->save();
if ($issue->pic_id) {
flash(__('issue.pic_assigned'), 'success');
} else {
flash(__('issue.pic_removed'), 'warning');
}
return back();
}
}