I'm new using laravel (Laravel 5) and I try to install the Stylist package via Composer but not works. This is what I did:
Get the package via composer ()
Add 'FloatingPoint\Stylist\StylistServiceProvider', to config/app.php file
Use php artisan vendor:publish to get the Stylist's config file
Make a themes dir (with subdirs and theme.json file to test) and configure into Stylist's config file
Now: I don't know where I need to add the Stylist::registerPath('/absolute/path/to/theme', true); line
Pd: sorry for my bad english :(
You would make a ThemeServiceProvider where you can register and activate your themes.
Related
Is there any way to install laravel from only composer.json file by using
composer install
command. If i just copy composer.json from existing project it creates only vendor directory, but not app, database, etc.
I just want to load all laravel core files, project file structure and my custom package by using install command of composer.
Can someone help me with this?
You can install laravel with the command composer create-project --prefer-dist laravel/laravel <project_name> if you only want to use composer, this command is mandatory since it creates the directories you want.
See the documentation
I don't think you can.
Create a new laravel project or clone an old project from git. Then replace/update the composer.json, then run composer update, if its a new project or composer install, if you cloned a repo
I didn't find solution for this, maybe it's impossible.
So, i just create my package and manually copy my custom composer.json to project.
After Successfully install laravel 5 When I try to update composer or install any laravel packages via composer getting this error
Artisan file is missing. Download the artisan file. If not work download bootstrap folder & replace into your bootstrap folder.
See: How do I download a particular file from GitHub?
When I download any Laravel project and run composer install it says to me:
Composer could not find a composer.json file in C:\Users\gbl\My
Documents\vertrigoserv\www\
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
It doesnt work with any Laravel project i try to run. There is composer.json in all the projects, but composer cant find them.
I am using Windows 10. Tried to reinstall composer few times and nothing happens.
you might want to try installing composer with-in your project directory.
that will create composer.json in your project folder which will enable you to add whichever packages that you wish to add to this composer.json and update it.
also make sure you have added php and composer in your PATH variable
give this a try and let me know if it solved your issue.
I'm installing Yii2 in the way that shows the Getting Started tutorial:
composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
When I try to access localhost/YiiTutorial/basic/web I get this error:
Invalid Parameter – yii\base\InvalidParamException
The file or directory to be published does not exist: C:\wamp\www\YiiTutorial\basic\vendor\bower/jquery/dist
In the tutorial says that is nothing to edit... it should work right out of the box... what I'm missing?
If I download the package and place it in the same folder, it works perfect, but I want to install it from composer!
Inside vendor/bower folder it's another one called bower-asset.
Copy this folder content (some other folders named bootstrap, jquery, etc...) and move them to vender/bower.
it a recent bug. update your fxp plugin to latest version (1.1.1) and clear composer's cache and try :
composer self-update
composer global update
composer update
Mainly if not issue regarding to vendor installation so please give permission to your /assets and /runtime folers of your projects and try to run again.
In your vendor folder you should rename bower-asset to bower .
OR you can use the following
make sure that you have the following in your composer.json:
composer.json
Other ways
I have encountered this kind of problem lately, the issue is in your composer it missing the asset-plugins which allows managing bower and npm package dependencies through Composer. Just run this command, you only need to run this command once for all. You can read the yii2 docs. Yii2 Installation
composer global require "fxp/composer-asset-plugin:^1.2.0"
I want to make use of auth system which comes with the laravel package but the problem is when I make new laravel package using composer i.e composer create-project laravel/laravel project name --prefer-dist
it do not install those auth resources which includes (i.e. auth folder inside resources > views) and also I can't find the Services Folder inside app directory.
All other things are working fine except this authentication system.
What can be the possible problems? Please give me solution
I am working with MAMP.
Taylor Otwell has made it opt-in for Laravel 5.1
You need to run following command after installation
php artisan scaffold:auth
UPDATE
I think this has been answered here
You could also run the command php artisan make:auth in the root directory of you laravel project. I had the same problem and it worked for me.
The command php artisan scaffold:auth didn't work for me i don't know why.
it issued the error:
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "auth" is not defined.
Did you mean this?
make:auth
in Laravel 5.2 you just have to run this command "php artisan make:auth" and the auth folder will be created
Since laravel 6.* version make:auth is no longer supported, use ui:auth instead.
For deploying ui pack run
composer require laravel/ui --dev
then update composer.json :
composer update -W
and do the:
php artisan ui:auth
You need execute
php artisan make:auth
now if your style css and js are missing
You need load file .css and .js
1) execute in your project
npm install
2) then execute
npm run dev => now in folder /public now exist folder js and css
3) reload page