yaapis / theme Goto Github PK
View Code? Open in Web Editor NEWLaravel's theme manager
License: MIT License
Laravel's theme manager
License: MIT License
Are you sure you used the right syntax ('theme::assets_path') ?
$assets_path = trim($this->app['config']->get('theme::assets_path', 'assets/themes'), '/');
Hi there - is there any plan to make this package compatible with Laravel 5.4? $this->app->share
was removed from 5.4, and needs to instead use singletons. I can work on a PR for this if you'd be willing to accept it, and if you don't think you'll have time to work on it yourself.
Thanks!
After installing & using this package, PhpStorm can't go to the file directly by pressing the name of the views.
return view('pages.notifications.jobIndex', [ 'entries' => $entries ]);
Who knows how to fix this?
I make login view under /themes/theme-name/views/auth/login.blade.php
and activate Theme::init("theme-name") already
but view does not override
How can i do it?
Hi, I'm very interested in using yaapis Theme but there is an error white trying to install via composer ...
Problem 1
- Conclusion: remove laravel/framework v5.2.6
- Conclusion: don't install laravel/framework v5.2.6
- Conclusion: don't install yaap/theme v2.1.1
- Conclusion: don't install yaap/theme 2.1
- Conclusion: don't install illuminate/support v5.0.33
- Conclusion: don't install laravel/framework v5.2.5
- Conclusion: don't install illuminate/support v5.0.28
- Conclusion: don't install laravel/framework v5.2.4
- Conclusion: don't install illuminate/support v5.0.26
- Conclusion: don't install laravel/framework v5.2.3
- Conclusion: don't install illuminate/support v5.0.25
- Conclusion: don't install laravel/framework v5.2.2
- Conclusion: don't install illuminate/support v5.0.22
- Installation request for yaap/theme 2.* -> satisfiable by yaap/theme[2.0, 2.1, v2.1.1].
- Conclusion: don't install laravel/framework v5.2.1
- yaap/theme 2.0 requires illuminate/support 5.0.* -> satisfiable by illuminate/support[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4].
- don't install illuminate/support v5.0.0|don't install laravel/framework v5.2.0
- don't install illuminate/support v5.0.4|don't install laravel/framework v5.2.0
- Installation request for laravel/framework 5.2.* -> satisfiable by laravel/framework[v5.2.0, v5.2.1, v5.2.2, v5.2.3, v5.2.4, v5.2.5, v5.2.6]
Maybe an update in yaapis/theme/composer.json to support laravel 5.2 would do the trick?
Cheers ;D
My config:
'containerDir' => [
'layout' => 'layouts',
'partial' => 'partials',
'view' => 'templates', // <-- as you can see I changed default directory placement
]
But in the function 'Init' you continue to use default 'view' directory:
$this->finder->addLocation($path . '/' . $theme . '/views');
I suppose you have to change it to:
config('theme.containerDir.view')
UPDATE
when I run
php artisan optimize --force -vvv
I see :
Generating optimized class loader
Compiling common classes
Compiling views
[InvalidArgumentException]
The "/var/www/project/app/views/themes/default/views" directory does not exist.
Exception trace:
() at /var/www/project/vendor/symfony/finder/Symfony/Component/Finder/Finder.php:677
Symfony\Component\Finder\Finder->in() at /var/www/project/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:272
Illuminate\Filesystem\Filesystem->allFiles() at /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php:130
Illuminate\Foundation\Console\OptimizeCommand->compileViews() at /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php:71
Illuminate\Foundation\Console\OptimizeCommand->fire() at /var/www/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:112
Illuminate\Console\Command->execute() at /var/www/project/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
Symfony\Component\Console\Command\Command->run() at /var/www/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:100
Illuminate\Console\Command->run() at /var/www/project/vendor/symfony/console/Symfony/Component/Console/Application.php:889
Symfony\Component\Console\Application->doRunCommand() at /var/www/project/vendor/symfony/console/Symfony/Component/Console/Application.php:193
Symfony\Component\Console\Application->doRun() at /var/www/project/vendor/symfony/console/Symfony/Component/Console/Application.php:124
Symfony\Component\Console\Application->run() at /var/www/project/artisan:59
optimize [--force] [--psr]
this is my laravel version
Laravel Framework version 4.2.17
and this my theme config
<?php
return array(
/*
|--------------------------------------------------------------------------
| Theme name
|--------------------------------------------------------------------------
|
| Use in assets publishing etc
|
*/
'name' => 'default',
/*
|--------------------------------------------------------------------------
| Inherit from another theme
|--------------------------------------------------------------------------
|
| Set up inherit from another if the file is not exists
|
*/
'inherit' => null,
);
this is my directory structure for the app/views directory
app/views
└── themes
└── default
├── auth
├── config.php
├── emails
├── hello.blade.php
├── layouts
├── menu
├── partials
└── users
the package config:
<?php
return array(
/*
|--------------------------------------------------------------------------
| Path to directory with themes
|--------------------------------------------------------------------------
|
| The directory with your themes.
|
*/
'path' => app_path('views/themes'),
/*
|--------------------------------------------------------------------------
| Path to directory with assets
|--------------------------------------------------------------------------
|
| The directory with assets.
|
*/
'assets_path' => 'assets/themes',
/*
|--------------------------------------------------------------------------
| A pieces of theme collections
|--------------------------------------------------------------------------
|
| Inside a theme path we need to set up directories to
| keep "layouts", "assets" and "partials".
|
*/
'containerDir' => array(
'layout' => 'layouts',
'partial' => 'partials',
'view' => '',
),
);
the last thing I will need to tell you about is I set my
Theme::init('default');
in
app/start/globals.php
When i create a theme from cli
php artisan theme:create default
I get this error
[YAAP\Theme\Exceptions\ThemeException]
Theme default not found.
on laravel 5.4
is this package support twig template engine ?
where should i use Theme::init('mytheme');
to init theme?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.