Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
var
www
multi-event-cfp.bitkit.dk
httpdocs
app
Mail
File Content:
UserCreate.php
<?php namespace App\Mail; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; use App\Lib\EmailSetupHelper; class UserCreate extends Mailable { use Queueable, SerializesModels; protected $event; protected $user; protected $userType; protected $roles; protected $emailSetup; const KEY_TO_NEW_USER_CREATE = "user_create_new"; const KEY_TO_EXISTING_USER_CREATE = "user_create_existing"; /** * Create a new message instance. * * @return void */ public function __construct($event, $user, $userType, $roles, $password = null) { $this->event = $event; $this->user = $user; $this->userType = $userType; $this->roles = $roles; $this->password = $password; foreach ($this->roles as $role) { $role = $this->eventRoles($role); $allRoles[] = $role; } $this->allRoles = implode(', ', $allRoles); $this->emailSetup = new EmailSetupHelper(); } function getEventUrl() { $link = ''; foreach ($this->roles as $role) { $role = $this->eventRoles($role); $eventUrl = config('app.url') . '/' . $this->event->slug_name . '/' . strtolower($role) . '/login'; $link .= "{$role} : <a href={$eventUrl}>{$eventUrl}</a>.<br/>"; } return $link; } /** * Build the message. * * @return $this */ public function build() { $logo = config('app.url') . '/' . $this->event->theme['logo']['value']; $eventHeader = $this->event->event_name; $emailContents = $this->emailSetup->getEmailData($this->event->id,$this->userType == 'existing' ? self::KEY_TO_EXISTING_USER_CREATE : self::KEY_TO_NEW_USER_CREATE); $variables = [ 'profile_name' => $this->user->name, 'event_name' => $this->event->event_name, 'username' => $this->user->email, 'password' => $this->userType == 'existing' ? '' : $this->password, 'role_based_event_links' => $this->getEventUrl(), 'roles' => $this->allRoles ]; $subject = $this->emailSetup->formatEmailBody($emailContents->subject,$variables); $body = html_entity_decode($this->emailSetup->formatEmailBody($emailContents->body,$variables)); // if ($this->userType == 'existing') { // $body = " // <p> // Hi {$this->user->name},<br/><br/> // You have been added as {$this->allRoles} to the event <b> {$this->event->event_name} </b>. You can login to the {$this->event->event_name} using the below details. <br><br> // Username: {$this->user->email}<br>" . // $this->getEventUrl() // . "<br> // Thank you,<br> // {$this->event->event_name} Team<br> // </p>"; // } else { // $body = " // <p> // Hi {$this->user->name},<br/><br/> // You have been added as {$this->allRoles} to the event <b> {$this->event->event_name} </b>. You can login to the {$this->event->event_name} using the below details. <br><br> // Username: {$this->user->email}<br> // Password: {$this->password}<br>" . // $this->getEventUrl() // . "<br> // Thank you,<br> // {$this->event->event_name} Team<br> // </p>"; // } return $this->from(config('app.admin_mail', 'Admin'), $this->event->event_name) ->subject($subject) ->view('emails.admin.user_created') ->with([ "body" => $body, "logo" => $logo, "eventHeader" => $eventHeader ]); } public function eventRoles($role) { switch ($role) { case "event_admin": return "admin"; break; case "event_submitter": return "submitter"; break; case "event_reviewer": return "reviewer"; break; case "event_co_chair": return "co-chair"; break; } } }
Edit
Download
Unzip
Chmod
Delete