fadeout alert
This commit is contained in:
parent
1b8da73604
commit
4a6bba437d
2 changed files with 12 additions and 5 deletions
|
@ -50,10 +50,14 @@ protected function approved() : Attribute
|
||||||
public static function store(array $validated) : Joined
|
public static function store(array $validated) : Joined
|
||||||
{
|
{
|
||||||
$validated['image'] = $validated['image'] ?? null;
|
$validated['image'] = $validated['image'] ?? null;
|
||||||
$validated['image'] = self::imagePath($validated['image']);
|
|
||||||
$validated['approved'] = $validated['approved'] ?? false;
|
|
||||||
|
|
||||||
$joined = auth_collective()->joined()->create($validated);
|
$joined = new static();
|
||||||
|
$joined->url = $validated['url'];
|
||||||
|
$joined->subject = $validated['subject'];
|
||||||
|
$joined->image = self::imagePath($validated['image']);
|
||||||
|
$joined->approved = $validated['approved'] ?? false;
|
||||||
|
|
||||||
|
auth_collective()->joined()->save($joined);
|
||||||
$joined->categories()->sync($validated['categories']);
|
$joined->categories()->sync($validated['categories']);
|
||||||
|
|
||||||
return $joined;
|
return $joined;
|
||||||
|
|
|
@ -58,9 +58,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<livewire:scripts />
|
<livewire:scripts />
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.0.js"
|
||||||
|
integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk="
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var timeout = 3000; // in miliseconds (3*1000)
|
$('.alert').delay(5000).fadeOut(500);
|
||||||
$('.alert').delay(timeout).fadeOut(300);
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in a new issue