-
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.
- Loading branch information
1 parent
d7f96f2
commit e2f9973
Showing
29 changed files
with
827 additions
and
758 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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,19 @@ | ||
<?php | ||
|
||
namespace App\Http; | ||
|
||
use Livewire\Attributes\Layout; | ||
use Livewire\Component; | ||
|
||
#[Layout('layouts.app', ['title' => 'Add Property'])] | ||
class Test extends Component | ||
{ | ||
|
||
#[Validate('required|string|numeric|digits:5|regex:/^\d{5}$/', as: 'zip / postal code')] | ||
public ?int $address_postal; | ||
|
||
public function render() | ||
{ | ||
return view('test'); | ||
} | ||
} |
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 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,17 @@ | ||
|
||
/** | ||
* This mask is to validate a url slug | ||
* | ||
* @param {string} text - the text to mask | ||
* @returns | ||
*/ | ||
function slugify(text) { | ||
return text.toString().toLowerCase() | ||
.replace(/\s+/g, '-') // Replace spaces with dashes | ||
.replace(/[^\w\-]+/g, '') // Remove non-word characters | ||
.replace(/\-\-+/g, '-') // Replace multiple dashes with a single dash | ||
.replace(/^-+/, '') // Remove leading dashes | ||
// .replace(/-+$/, ''); // Remove trailing dashes | ||
} | ||
|
||
window.slugify = slugify |
Oops, something went wrong.