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
//Add it in your Functions file at the least | |
//Created a function to hook into the init. | |
// | |
function add_cors_http_header(){ | |
//An Array of allowed domains. | |
$allowed = array( | |
"http://localhost:3000", | |
"http://another-domain.com" |
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
aa : Afar | |
ab : Abkhazian | |
af : Afrikaans | |
ak : Akan | |
am : Amharic | |
ar : Arabic | |
an : Aragonese | |
as : Assamese | |
av : Avaric | |
ae : Avestan |
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
AF : Afghanistan | |
AX : Aland Islands | |
AL : Albania | |
DZ : Algeria | |
AS : American Samoa | |
AD : Andorra | |
AO : Angola | |
AI : Anguilla | |
AQ : Antarctica | |
AG : Antigua and Barbuda |
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
import React, {useEffect, useState} from 'react' | |
export default function Example(props) { | |
// you don't have to call these state and setState. | |
const [state, setState] = useState([state]) | |
// Think of this as ComponentDidMount | |
useEffect(() => { |
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
AED : United Arab Emirates dirham | |
AFN : Afghan afghani | |
ALL : Albanian lek | |
AMD : Armenian dram | |
ANG : Netherlands Antillean guilder | |
AOA : Angolan kwanza | |
ARS : Argentine peso | |
AUD : Australian dollar | |
AWG : Aruban florin | |
AZN : Azerbaijani manat |
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
<?php | |
Forms\Components\TextInput::make('title') | |
->required() | |
->live(true) | |
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state))), | |
Forms\Components\TextInput::make('slug') | |
->disabled() | |
->dehydrated() | |
->maxLength(255) | |
->unique(Page::class, 'slug', ignoreRecord: true), |