Skip to content

Instantly share code, notes, and snippets.

@ferdiunal
Created June 11, 2016 19:31
Show Gist options
  • Save ferdiunal/94d2958ce092c5a66fa505d85be65bd7 to your computer and use it in GitHub Desktop.
Save ferdiunal/94d2958ce092c5a66fa505d85be65bd7 to your computer and use it in GitHub Desktop.
Laravel Custom Directory
<?php
namespace Lib;
use Illuminate\Foundation\Application as Laravel;
/**
* @name Ferdi ÜNAL
* @email ferdi@unal.pw
*/
class Application extends Laravel
{
/**
* Get the path to the application configuration files.
*
* @return string
*/
public function configPath(){
return $this->basePath.DIRECTORY_SEPARATOR.'system'.DIRECTORY_SEPARATOR.'config';
}
/**
* Get the path to the bootstrap directory.
*
* @return string
*/
public function bootstrapPath(){
return $this->basePath.DIRECTORY_SEPARATOR.'system'.DIRECTORY_SEPARATOR.'bootstrap';
}
/**
* Get the path to the database directory.
*
* @return string
*/
public function databasePath(){
return $this->basePath.DIRECTORY_SEPARATOR.'system'.DIRECTORY_SEPARATOR.'database';
}
/**
* Get the path to the storage directory.
*
* @return string
*/
public function storagePath(){
return $this->basePath.DIRECTORY_SEPARATOR.'system'.DIRECTORY_SEPARATOR.'storage';
}
/**
* Get the path to the language files.
*
* @return string
*/
public function langPath()
{
return $this->basePath.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'lang';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment