This file contains hidden or 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 | |
#Province methods | |
\Sepisoltani\Iran\Facades\Iran::get_provinces() # returns collection of all provinces | |
\Sepisoltani\Iran\Facades\Iran::get_approved_provinces() # returns collection of approved provinces | |
\Sepisoltani\Iran\Facades\Iran::find_province($id) # returns province found with the $id |
This file contains hidden or 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 | |
return [ | |
'use_cache' => false, # change this to true if you wants to use cache | |
'cache_times' => [ | |
'provinces' => 86400, # time to purge provinces methods query caches | |
'countries' => 86400, # time to purge countries methods query caches | |
'cities' => 86400, # time to purge cities methods query caches | |
], |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity >0.5.2; | |
contract Sepehr { | |
struct One { | |
uint256 a; | |
uint256 b; | |
uint256 c; | |
} |
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity >0.5.2; | |
contract Sepehr { | |
uint256 = 10; | |
uint32 = 10; | |
uint26 = 10; | |
uint8 = 10; | |
} |
This file contains hidden or 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
contract HelloWorld { | |
} |
This file contains hidden or 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
pragma solidity >=0.5.0 <0.6.0; | |
contract HelloWorld { | |
} |
This file contains hidden or 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
contract Example { | |
// This will be stored permanently in the blockchain | |
uint myUnsignedInteger = 100; | |
} |
This file contains hidden or 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
struct Person{ | |
uint age; | |
string name; | |
} |
This file contains hidden or 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
contract Example{ | |
// Array with a fixed length of 2 elements: | |
uint[2] fixedArray; | |
// another fixed Array, can contain 5 strings: | |
string[5] stringArray; | |
// a dynamic Array - has no fixed size, can keep growing: | |
uint[] dynamicArray; | |
This file contains hidden or 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
contract Example{ | |
Person[] people; // dynamic Array, we can keep adding to it | |
} |
OlderNewer