mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 00:01:21 +00:00
Apply fixes from StyleCI
[ci skip] [skip ci]
This commit is contained in:
@@ -2,17 +2,16 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\ContactFormRequest;
|
||||
use App\Mail\ContactUs;
|
||||
use App\Models\Admin;
|
||||
use App\Mail\ContactUs;
|
||||
use App\Models\Settings;
|
||||
use App\Notifications\InboxMessage;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Notifications\InboxMessage;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Http\Requests\ContactFormRequest;
|
||||
|
||||
class ContactUsController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* @param mixed $ability
|
||||
* @param array $arguments
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use App\Http\Requests\ContactFormRequest;
|
||||
|
||||
class Admin extends Model
|
||||
{
|
||||
@@ -18,7 +17,8 @@ class Admin extends Model
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct() {
|
||||
public function __construct()
|
||||
{
|
||||
$this->admin = env('ADMIN_USER');
|
||||
$this->email = Settings::settingValue('site.main.email');
|
||||
}
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
namespace App\Notifications;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use App\Http\Requests\ContactFormRequest;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
class InboxMessage extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
|
||||
protected $message;
|
||||
|
||||
/**
|
||||
@@ -24,6 +22,7 @@ class InboxMessage extends Notification
|
||||
{
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
@@ -44,7 +43,7 @@ class InboxMessage extends Notification
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
return (new MailMessage)
|
||||
->subject(env('ADMIN_USER') .', you got a new message!')
|
||||
->subject(env('ADMIN_USER').', you got a new message!')
|
||||
->greeting(' ')
|
||||
->salutation(' ')
|
||||
->from($this->message->email, $this->message->name)
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ Route::get('/xxx', function () {
|
||||
})->middleware('auth');
|
||||
|
||||
Route::get('/contact-us', 'ContactUsController@show');
|
||||
Route::post('/contact-us', 'ContactUsController@mailToAdmin');
|
||||
Route::post('/contact-us', 'ContactUsController@mailToAdmin');
|
||||
|
||||
Route::post('/contact-us', function () {
|
||||
redirect('/contact-us');
|
||||
|
||||
Reference in New Issue
Block a user