public function makeModel() { $model = $this->_app->getFacadeApplication()->make($this->model()); if (!$model instanceof Model) { throw new \Exception("Class {$this->model()} must be an instance of Illuminate\\Database\\Eloquent\\Model"); } return $this->model = $model; }
/** * CreatePDFJob constructor. * @param $html * @param $fileName * @param array $options * @param array $S3Options */ public function __construct($html, $fileName, array $options, array $S3Options = null) { $this->html = $html; $this->fileName = $fileName; $this->options = $options; $this->S3Options = $S3Options ?: \App::getFacadeApplication()['config']['filesystems.disks.s3']; }
* Assets management * ---------------------------------- * @link https://github.com/Giuseppe-Mazzapica/Occipital * * Assets::addStyle( 'my-style' ) * * ->src( Config::get('assets.css.url').'/layout.css' ) * * ->deps(['wp-color-picker' ]) * * // replace following with real ids of the style you merged * ->provide( [ 'dashicons', 'admin-bar', 'bootstrap', 'fontawesome' ] ) * * ->ver( filemtime( '/srv/www/wp/wp-content/themes/my/style.css' ) ) * * ->after( 'body { height: 100%; }' ) * * ->media( 'screen' ) * * ->isFooter( false ) * * ->condition( function( WP_Query $query, $user ) { * * return $query->is_page( 'special-page' ) && user_can( $user, 'edit_pages' ); * * }); */ $env = App::getFacadeApplication()['env']; $ver = Config::get('assets.ver'); $cssUrl = Config::get('assets.css.url'); $jsUrl = Config::get('assets.js.url');
public function lar_ver() { $app = App::getFacadeApplication(); return $app::VERSION; }