@@ -227,18 +227,20 @@ function env_update(?string $key = null, string|bool $value = null, ?bool $quote
227227 }
228228}
229229
230- if (! AppIsNotCorePHP () && ! function_exists ('asset ' )) {
230+ if (! function_exists ('asset ' )) {
231231 /**
232232 * Create assets Real path url
233233 *
234234 * @param string $asset
235235 * - asset file e.g (style.css | js/main.js)
236236 *
237+ * @param bool $cache
238+ *
237239 * @return string
238240 */
239- function asset ($ asset = null )
241+ function asset ($ asset = null , ? bool $ cache = false )
240242 {
241- return Asset::asset ($ asset );
243+ return Asset::asset ($ asset, $ cache );
242244 }
243245}
244246
@@ -251,19 +253,41 @@ function asset($asset = null)
251253 * - If set and directory is not found, then we revert back to the default
252254 *
253255 * @param string $cache
254- * - [optional] Default is true
256+ * - [optional] Default is false
255257 * - End point of link `?v=xxxxxxxx` is with cache of file time change
256258 * - This will automatically tells the broswer to fetch new file if the time change
257259 * - Time will only change if you make changes or modify the request file
258260 *
259261 * @return void
260262 */
261- function asset_config ($ base_path = null , ?bool $ cache = true )
263+ function asset_config ($ base_path = null , ?bool $ cache = false )
262264 {
263265 Asset::config ($ base_path , $ cache );
264266 }
265267}
266268
269+ if (! function_exists ('config_asset ' )) {
270+ /**
271+ * Configure Assets Default Directory
272+ *
273+ * @param string $base_path
274+ * - [optional] Default is `base_directory/assets`
275+ * - If set and directory is not found, then we revert back to the default
276+ *
277+ * @param string $cache
278+ * - [optional] Default is true
279+ * - End point of link `?v=xxxxxxxx` is with cache of file time change
280+ * - This will automatically tells the broswer to fetch new file if the time change
281+ * - Time will only change if you make changes or modify the request file
282+ *
283+ * @return void
284+ */
285+ function config_asset ($ base_path = null , ?bool $ cache = true )
286+ {
287+ asset_config ($ base_path , $ cache );
288+ }
289+ }
290+
267291if (! AppIsNotCorePHP () && ! function_exists ('__ ' )) {
268292 /**
269293 * Translate the given message.
0 commit comments