Completed
Push — master ( f06f41...6c4f3d )
by Ryan
02:40
created

TestNotification::via()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php namespace Anomaly\UsersModule\User\Notification;
2
3
use Illuminate\Notifications\Notification;
4
use Illuminate\Notifications\Messages\MailMessage;
5
6
class TestNotification extends Notification
7
{
8
    /**
9
     * Get the notification's delivery channels.
10
     *
11
     * @param  mixed $notifiable
12
     * @return array
13
     */
14
    public function via($notifiable)
15
    {
16
        return ['mail'];
17
    }
18
19
    /**
20
     * Get the mail representation of the notification.
21
     *
22
     * @param  mixed                                          $notifiable
23
     * @return \Illuminate\Notifications\Messages\MailMessage
24
     */
25
    public function toMail($notifiable)
26
    {
27
        $url = url('/test');
28
29
        return (new MailMessage)
30
                    ->line('One of your invoices has been paid!')
31
                    ->action('View Invoice', $url)
32
                    ->line('Thank you for using our application!');
33
    }
34
}
35