PHP Classes

File: src/fallback.php

Recommend this page to a friend!
  Classes of Ahmed Saad   Saad Laravel PHP Fractal Transformer   src/fallback.php   Download  
File: src/fallback.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Saad Laravel PHP Fractal Transformer
Transform data presented by Laravel applications
Author: By
Last change:
Date: 2 years ago
Size: 814 bytes
 

Contents

Class file image Download
<?php

if (! function_exists('config_path')) {
   
/**
     * Get the configuration path.
     *
     * @param string $path
     * @return string
     */
   
function config_path($path = '')
    {
        return
app()->basePath() . '/config' . ($path ? '/' . $path : $path);
    }
}

if (!
function_exists('public_path')) {
   
/**
     * Return the path to public dir
     *
     * @param null $path
     * @return string
     */
   
function public_path($path = null)
    {
        return
rtrim(app()->basePath('public/' . $path), '/');
    }
}

if (!
function_exists('app_path')) {
   
/**
     * Return the path to app dir
     *
     * @param null $path
     * @return string
     */
   
function app_path($path = null)
    {
        return
app()->basePath() . '/app' . ($path ? '/' . $path : $path);
    }
}