Code Duplication    Length = 16-16 lines in 2 locations

src/helpers.php 2 locations

@@ 75-90 (lines=16) @@
72
    }
73
}
74
75
if (!function_exists('admin_toastr')) {
76
77
    /**
78
     * Flash a toastr message bag to session.
79
     *
80
     * @param string $message
81
     * @param string $type
82
     * @param array  $options
83
     */
84
    function admin_toastr($message = '', $type = 'success', $options = [])
85
    {
86
        $toastr = new MessageBag(get_defined_vars());
87
88
        session()->flash('toastr', $toastr);
89
    }
90
}
91
92
if (!function_exists('admin_success')) {
93
@@ 134-149 (lines=16) @@
131
    }
132
}
133
134
if (!function_exists('admin_info')) {
135
136
    /**
137
     * Flash a message bag to session.
138
     *
139
     * @param string $title
140
     * @param string $message
141
     * @param string $type
142
     */
143
    function admin_info($title, $message = '', $type = 'info')
144
    {
145
        $message = new MessageBag(get_defined_vars());
146
147
        session()->flash($type, $message);
148
    }
149
}
150
151
if (!function_exists('admin_asset')) {
152