Sanctum Version: 2.15
Laravel Version: 9.11
PHP Version: 8.0.2
Database Driver & Version: mysql
Description:
I publish Sanctum did not generate the configuration
Steps To Reproduce:
The Laravel Sail development environment was used
into the shell and perform
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
prompt
Copied Directory [/vendor/laravel/sanctum/database/migrations] To [/database/migrations] Publishing complete.
But there are no migration files generated under my migrations directory
Later, I checked the directory permission and found no problem.
Although it can be added manually, I still want to know where this problem can be investigated, because I did not see it mentioned in the document
Related
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
I've seen answers for this question, but I'm still really confused, because answers say I need to be in my Laravel's project folder, which I thought I had created.
I'm trying to run the command php
php artisan horizon:install
This is the second step in the Laravel installation guide found here: https://laravel.com/docs/7.x/horizon#installation
My directory structure looks like this in my documents folder in Mac OS:
I've tried running the command in the RetimeWeb, vendor, bin, laravel and horizon folders. What am I doing wrong here? Where is an artisan folder supposed to be?
Laravel Horizon is dashboard for managing queues (jobs) in Laravel that supposed to be installed on top of Laravel project.
Based on your directory structure you installed Horizon from composer alone. Now you are trying to run command "php artisan horizon:install" but artisan is a tool from Laravel.
"horizon:install" supposed to copy all assets, configs etc to Laravel project - but again, you do not have any so there is not even where to copy it.
To summary.
Install Laravel.
Install Laravel Horizon.
Do cd until you're in the root folder of your project and run the command again. artisan file is in the root folder of a laravel project
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
I am following Laravel documentation for creating Authentication system.
My Steps Are
Installing fresh laravel using laravel new my-project
Then enter into directory (cd my-project). Edit the database config file with database credentials.
Then run php artisan make:auth. All migration php files are created.
Run php artisan migrate. CLI responds with nothing to migrate
So I went back to check the database using phpmyadmin. I do not see any migration table.
System & Version info
Vagrant box laravel/homestead
Database mariaDb
Laravel installer v1.3.5, by cli command laravel -v
Laravel v5.4.16, from composer.lock
Can anyone point me to the right direction?
Also, you can try this:
php artisan migrate:install which creates the migrations table only
php artisan migrate runs your other migrations
Configure your database in .env file
DB_HOST=127.0.0.1
DB_DATABASE=DbName //Your DB Name
DB_USERNAME=root
DB_PASSWORD=password123
I am using a third party library and locally, I installed everything using the steps that they provided.
I ran composer require on the package and ran an update. This installed into the vendor folder.
I then added the path into the provider in config/app and also as an aliases..
I ran php artisan vendor:publish --provider="Spatie\LaravelAnalytics\LaravelAnalyticsServiceProvider" the config file created successfully and I had no problems.
I then uploaded to the production environment and kept on getting Class 'LaravelAnalytics' not found and I can't seem to figure out the problem..
I ran php artisan vendor:publish --provider="Spatie\LaravelAnalytics\LaravelAnalyticsServiceProvider"
But I kept on getting: Nothing to publish for tag []. which has lead me to thinking that this could be the problem since the package is not published.
My local environment is Ubuntu and my production Environment is CentOS.. If I try to CD into that directory on my production environment it says cannot find.
Could this therefore be a problem with the case sensitive on how I am adding my providers that is not picking up this package?
are you using cached config files ?
try using
php artisan config:clear
and retry
php artisan vendor:publish
You have to save all for the project before (php artisan vendor:publish).