Laravel - install Levare modules - php

Hello how can I create and use modules in laravel ?
I read this: https://github.com/LevareCMS/modulemanager#how-to-use but it doesn't work.
when I put into console: php artisan config:publish app/modules then I see error:
[InvalidArgumentException] Configuration not found.
Everything I created like in above information.
Second question: How can I generate new modules ?
Thanks !

There is an error when publishing config files, change app for levare
php artisan config:publish levare/modules

Related

How to Install Swagger to Laravel 8 API for documentation?

Installing Swagger for the First Time in laravel 8
composer require "darkaonline/l5-swagger"
composer require zircote/swagger-php
php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
Getting Error like:
I'm guessing the URL you're hitting might be incorrect. Change it to just docs/api-docs instead of docs/api-docs.json. In addition, if you haven't ran the generate command already, you would have to do so to make it work.
php artisan l5-swagger:generate

Laravel Lighthouse Config - unable to locate publishable resources

I have installed the latest version of Lighthouse into my Laravel 7 app and it's been working fine with the out-of-the-box config. I now want to tweak some settings for better security, so as per the docs I have tried to use the following command:
php artisan vendor:publish --tag=lighthouse-config
to publish the config file. But I get the following error:
Unable to locate publishable resources.
Publishing complete.
No lighthouse.php file is published to the config folder. Any ideas how to fix this?
Just tried it in an example project and it worked just fine.
A simple workaround is to run:
cp vendor/nuwave/lighthouse/src/lighthouse.php config/lighthouse.php
Laravel 8 Lighthouse Config:
just run php artisan vendor:publish and choose the class that you want to publish.
it's work for me on Laravel 8

Laravel route list returns error

When i try to show list of available routes artisan returns the following error:
$ php artisan route:list
[ReflectionException]
Class API does not exist
It worked a while ago but now i can't get it to work.
Laravel version is:
$ php artisan -V
Laravel Framework version 5.1.10 (LTS)
Is it possible to debug somehow this error?
You can find what's wrong in the storage/logs/laravel-YYYY-MM-DD.log file.
Check it, resolve and run artisan again.
What's your php version ? I think, if you are under php5.5, then change the shell.

Auth resources are missing in laravel

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

PHP app\console wont work trying to create bundle for Symfony2

I have installed Symfony2 on a iis 7 server with PHP 5.3.21 and everything works ok ( the php, the symphony demo page ).
I try to create my own helloWorld, as the tutorial says :
php app/console generate:bundle
I go Start->Run->CMD and put that line of code and it gives me back this :
could not open input file : app/console
and before anyone asks i am in the project directory when i perform this command
I put the PHP directory to the System PATH but the problem persists.
Update: I ended up getting on a screen sharing program with #reza and discovered he had accidentally set his PATH variable to D:\php\wamp\bin\php\php5.3.10\php.exe rather than D:\php\wamp\bin\php\php5.3.10. Fixing this solved the problem.
Check this: I can't create bundle in symfony2
For newer versions of Symfony (2.4.x or newer) use this method on windows to resolve the problem:
Go to project directory e.g. d:/xampp/symfony2-project/ and open composer.json and place this under requires array "symfony/console": "2.4.*#dev". And save the file.
Open command-line and cd to project's directory.
Use this command to let download and install the dependencies: php path/to/composer.phar install. Remember you should be in your project's directory and path/to/composer.phar is the actual path to your composer.phar file.
Now you are all done, just use php bin/console generate:bundle --namespace=Test/PrintBundle --format=yml to test bundle system works.
If you are creating Symfony 2.5 project using command prompt then console file is not storing the app folder but it storing in the bin folder so you need to use bin folder instead of app folder (CODE is : php bin/console generate:bundle).

Categories