artisan error while installing admin panel via composer - php

I am using laravel 4.2 and want to install admin panel. I tried to install it from here.
It installed complete after that i followed step 2 and 3 from that link.
And when i followed step 4 and tried this command
php artisan admin:install
I got error
there are no command defined in the 'admin' name space
Also i tried many other admin panel in laravel 4.2, but when i try to install it i am getting same error all time, only namespace will change.
I tried php artisan list and i can't find that command in list.

Run
php artisan optimize
to remove cached files and generate them again

Related

Laravel 8 UI issue

I have installed Laravel 8 as a new project. When I run the project I get the "In order to use the Auth::routes() method, please install the laravel/ui package." But Laravel installation doc says that laravel ui is depreciated and that we should use Jetstream. So I installed Jetstream with the Livewire stack. Back to test the project and I get the same error msg.
I have run a composer dump-autoload.
What do I have to do to get a Laravel 8 project to run?
You will need to clear and recreate cache. Run the following php artisan commands:
php artisan cache:clear
php artisan config:cache
php artisan route:cache
I had this problem as well on many 'upgrades' from earlier versions of Laravel. I don't want to change the entire auth mechanism, as it works, so I will keep the code I have.
#Elisha Senoo's answer is correct, and solved it most of the time. However, if you find yourself unable to clear the cache (because it has the same error message on the artisan command), the solution is to manually clear the .php files within the bootstrap/cache folder and then php artisan config:cache.

Laravel 6 user auth page not working properly

Today I installed laravel 6.x version for a new project.
I have PHP 7.3 in my system so laravel 6 was successfully installed.
Then I run this command to set the Auth UI for VueJS.
artisan ui vue —auth
along with this command:
composer require laravel/ui --dev
But when I checked my login page, it was just an html skeleton.
I checked over the internet and found a solution and tried to run this command,
npm run dev
But still am getting an ugly login page without css and Js files. I checked for CSS and JS files but found no solution.
Anyone please help and tell me how can I setup the front end scaffolding.
Thanks in advance
The command to implement Auth is as follows:
composer require laravel/ui
php artisan ui vue --auth
If your Login and Register page only shows plain HTML. And CSS is not loading properly then run this two command:
npm install
npm run dev
OR
Simply you've to follow this two-step.
composer require laravel/ui
php artisan ui:auth
This will solve your problem for sure!
Check if your npm install shows any deprecation error,
if shows then go to nodejs official site https://nodejs.org/en/ and download and install latest one in your system.
Then in your terminal run:
npm install
npm run dev
That's it.
In your laravel public folder, css and js should have shown after that npm run dev command.
Now your login and register page should be nice looking as expected.
Do one thing,
1) Create app.css and put into project_name/public/css/
2) Create app.js and put into project_name/public/js/
I believe it will work.
If not, make sure you have used these commands before.
npm install
npm run dev
Thanks.

Laravel nova 1.1.8 and higher Cannot read property 'name' of undefined on filter icon click

Laravel version: 5.7
When updating Laravel nova to a version higher then 1.1.7 when on a ResourceIndex page. Clicking on the filter icon results in the following error.
TypeError: Cannot read property 'name' of undefined
at Proxy.render (nova-custom-filters:3752)
at VueComponent.Vue._render (vendor.js?id=f1774ad54c9d6dde0d50:98488)
at VueComponent.updateComponent (vendor.js?id=f1774ad54c9d6dde0d50:96735)
at Watcher.get (vendor.js?id=f1774ad54c9d6dde0d50:97105)
at new Watcher (vendor.js?id=f1774ad54c9d6dde0d50:97094)
at mountComponent (vendor.js?id=f1774ad54c9d6dde0d50:96742)
at VueComponent.webpackJsonp../node_modules/vue/dist/vue.common.js.Vue.$mount (vendor.js?id=f1774ad54c9d6dde0d50:102494)
at VueComponent.webpackJsonp../node_modules/vue/dist/vue.common.js.Vue.$mount (vendor.js?id=f1774ad54c9d6dde0d50:104907)
at init (vendor.js?id=f1774ad54c9d6dde0d50:98074)
at createComponent (vendor.js?id=f1774ad54c9d6dde0d50:99545)
Even when I create a brand new filter and only load this filter on the resource.
1) Install a brand new Laravel 5.7 installation.
2) Install Nova. (php artisan nova:install and php artisan nova:publish)
3) Create a user.
4) Log into Nova.
5) See the error.
This error is NOT reproducible when upgrading for some reason. Once I replaced the nova-assets directory with a working copy, the test site worked. Once I deleted the nova-assets directory and re-published the Nova assets, it still works, even with a cleared browser cache.
POSSIBLE FIX (May be why it still works after republishing):
cd to the laravel/nova vendor directory.
Following this 5 steps I solved the problem but you need to rename webpack.mix.js.dist to webpack.mix.js before run npm run dev.
npm install
npm run dev
Delete the public/nova-assets directory.
Make sure to run php artisan nova:publish --force to get the latest assets after update.

Laravel voyager migration issue

I am working on windows and WAMP. I installed Laravel 5.4 within cmd and that was successful. After that I follow laravel voyager installation process and that was successful too.
Afterwards I checked /migrations/ folder and there are many tables for migration, for laravel itself and for voyager, but when I type php artisan migrate in cmd it migrate only "users" table, it ignored other tables so voyager is not working and showing errors that tables are missing.
I searched internet but could not find this type of issue.
I'm using mysql
In the Voyager documentation it says the following:
Before installing Voyager make sure you have installed one of the following versions of Laravel:
Laravel 6
Laravel 7
Laravel 8
Additionally Voyager requires you to use PHP 7.3 or newer.
Apparently with Laravel 5.4 it will not work .
To use Voyager on Laravel 5.x, you need to use version 1.3 of Laravel Voyager: https://github.com/the-control-group/voyager/tree/1.3
Remembering that it is not necessary to use the migrate command for Voyager to work.
The steps are:
composer require tcg/voyager
Next step you must create your database and insert your credentials in the .env file
You can choose to install Voyager without dummy data or with dummy data. For an installation without a dummy data, run the command:
php artisan voyager:install
For a dummy data installation:
php artisan voyager:install --with-dummy
You will need to access the url http://localhost:8000/ admin to access the voyager, if you installed with dummy data, you will have a super user created, with the following credentials:
email: admin#admin.com
password: password
If you have not created any dummy users, you can set an existing user in your database as admin by running the command:
php artisan voyager:admin your#email.com
Or you can create a new admin user, using the command:
php artisan voyager:admin your#email.com --create

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

Categories