-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated table columns,renamed form-component, implemented form …
- Loading branch information
Showing
8 changed files
with
45 additions
and
83 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Livewire; | ||
|
||
use App\Models\Project; | ||
use Illuminate\Support\Facades\Auth; | ||
use Illuminate\Support\Facades\Hash; | ||
use Livewire\Component; | ||
|
||
class JoinProjectForm extends Component | ||
{ | ||
public $projectUrl; | ||
|
||
public function save(){ | ||
if(Auth::check()) { | ||
$projectHash = Hash::make($this->projectUrl, [ | ||
'memory' => 516, | ||
'time' => 2, | ||
'threads' => 2, | ||
]); | ||
|
||
Project::create([ | ||
"project_url" => $this->projectUrl, | ||
"project_hash" => $projectHash, | ||
"user_id" => Auth::user()->id | ||
]); | ||
}else{ | ||
$this->redirect('/register'); | ||
} | ||
} | ||
|
||
public function render() | ||
{ | ||
return view('livewire.join-project-form'); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div> | ||
<form wire:submit="save" class="flex items-baseline gap-2"> | ||
<sl-input class="w-11/12" type="text" id="url" value="https://github.com/propromo-software" placeholder="url" filled wire:model="projectUrl"></sl-input> | ||
<sl-button class="" wire:click="save">submit</sl-button> | ||
</form> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -849,7 +849,7 @@ | |
</div> | ||
@endif | ||
|
||
<livewire:submit-id-form /> | ||
<livewire:join-project-form /> | ||
</div> | ||
</body> | ||
|
||
|