get_popular_posts(type = null, post = null, limit = 5)
Parameters
@param string type : Post type
@param array post : Post exclude
@param int limit : Rows limit
Helper Functions
Dump data
dump(...var)
Parameters
@param mixed ...var: Text or key translation
@return string
Dump data and exit
dd(...var)
Parameters
@param mixed ...var: Text or key translation
@return never
Get data translation of text
__(string text)
Parameters
@param string text: Text or key translation
@return string
Get full url from path
url(string path = '')
Parameters
@param string path (Optional) Return url home page if empty
@return string
Get csrf token
csrf_token()
Parameters
@return string
Get csrf token field
csrf_field()
Parameters
@return string
Get media full url from path
upload_url(string path = '')
Parameters
@param string path
@return string
Paginate render
paginate_links(data, view = null)
Parameters
@param data: Paginate data
@param string view: View paginate item
Finds whether a variable is an string
is_string(var)
Parameters
@param mixed var: The variable being evaluated.
@return bool true if var is an string
Check var is array
is_array(var)
Parameters
@param mixed var: The variable being evaluated.
@return bool true if var is an array
Get json from array
json_encode(array $array)
Parameters
@param mixed $value: The value being encoded. Can be any type except a resource.
@return string|false a JSON encoded string on success or FALSE on failure.
Calculate the md5 hash of a string
md5(str)
Parameters
@param string str
@return string the hash as a 32-character hexadecimal number.
Check current page is home page
is_home()
Parameters
@return bool true if current page is home page
Display dynamic sidebar.
By default, this displays the default sidebar or ‘sidebar-1’. If your theme specifies the ‘id’ or ‘name’ parameter for its registered sidebars you can pass an ID or name as the $index parameter. Otherwise, you can pass in a numerical index to display the sidebar at that index.
dynamic_sidebar(key)
Parameters
@param (int|string) key Index, name or ID of dynamic sidebar.
@return \Illuminate\Contracts\View\View
Display dynamic page block.
dynamic_block(post, key)
Parameters
@param $post Data post
@param (int|string) key Index, name or ID of dynamic sidebar.