Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/Http/Controllers/Community.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public function trending()
return view('trending');
}

public function showSubject($id) {
public function showSubject($id)
{
return view('communitysubject', [
'posts' => Post::all()->where('subject_id', $id)
]);
Expand Down
8 changes: 5 additions & 3 deletions app/Jobs/SendPostWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

class SendPostWebhook implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;

/**
* Create a new job instance.
Expand All @@ -38,8 +41,7 @@ public function __construct()
*/
public function handle($post)
{
foreach (\Auth::user()->Webhook()->get() as $w)
{
foreach (\Auth::user()->Webhook()->get() as $w) {
Http::post($w->url, [
'content' => "New post!",
'embeds' => [
Expand Down
9 changes: 7 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@

class User extends Authenticatable implements MustVerifyEmail
{
use HasApiTokens, HasFactory, Notifiable, Billable, TwoFactorAuthenticatable;
use HasApiTokens;
use HasFactory;
use Notifiable;
use Billable;
use TwoFactorAuthenticatable;

public function Institution()
{
Expand Down Expand Up @@ -54,7 +58,8 @@ public function Note()
return $this->hasMany(Note::class);
}

public function Like() {
public function Like()
{
return $this->hasMany(Like::class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class () extends Migration {
/**
* Run the migrations.
*
Expand Down