Skip to content

Commit 0e09489

Browse files
committed
change function name in Link class
1 parent f8aaa78 commit 0e09489

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/models/Link.php

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,31 @@ class Link extends Model {
1010
protected $table = 'links';
1111

1212
static $cache = [];
13-
public static function allCached($forceRefresh = false)
13+
public static function getAllLinks($forceRefresh = false) // allCached(
1414
{
1515
if (!isset(self::$cache['all']) || $forceRefresh) {
1616
self::$cache['all'] = Link::all();
1717
}
1818
return self::$cache['all'];
1919
}
20-
public static function returnUrls($forceRefresh = false) {
20+
public static function getUrls($forceRefresh = false) // returnUrls(
21+
{
2122
if (!isset(self::$cache['all_urls']) || $forceRefresh) {
2223
$configs = Link::allCached($forceRefresh);
2324
self::$cache['all_urls'] = $configs->pluck('url')->toArray();
2425
}
2526
return self::$cache['all_urls'];
2627
}
27-
public static function getMainUrls($forceRefresh = false){
28+
public static function getMainUrls($forceRefresh = false)
29+
{
2830
if (!isset(self::$cache['main_urls']) || $forceRefresh) {
2931
$configs = Link::where('main', '=', true)->get(['url']);
3032
self::$cache['main_urls'] = $configs->pluck('url')->toArray();
3133
}
3234
return self::$cache['main_urls'];
3335
}
34-
public function getAndSave($url, $label, $visibility){
36+
public function addNewLink($url, $label, $visibility) // getAndSave(
37+
{
3538
$this->url = $url;
3639
$this->display = $label;
3740
$this->show_menu = $visibility;

0 commit comments

Comments
 (0)