app/Http/Controllers/TicketController.php
/**
     * Download given attachment.
     *
     * @param Ticket $ticket
     * @param TicketAttachment $ticketAttachment
     * @return Response
     */
Download given attachment.
@param Ticket $ticket
@param TicketAttachment $ticketAttachment
@return Response
Download given attachment . @param Ticket $ticket @param TicketAttachment $ticketAttachment @return Response
public function download(Ticket $ticket, TicketAttachment $ticketAttachment)
    {
        if (!$ticket->is_mine || !$ticketAttachment->file_exists) {
            abort(404);
        }
        return Storage::disk('local')->download($ticketAttachment->url, $ticketAttachment->name);
    }
public function download ( Ticket $ ticket , TicketAttachment $ ticketAttachment ) { if ( ! $ ticket -> is_mine || ! $ ticketAttachment -> file_exists ) { abort ( 404 ) ; } return Storage :: disk ( 'local' ) -> download ( $ ticketAttachment -> url , $ ticketAttachment -> name ) ; }
Download given attachment.
Download given attachment .