Hey,
as the title suggests, vendor:publish doesn't publish a thing. It doesn't give me an error, just tells me that publishing is complete though.
If I manually copy the log.blade.php into views/vendor/laravel-log-viewer and edit that file, then I can see my changes.
Thanks for contributing! What version of Laravel do you use?
Ok, that's weird. I'm using v5.4.28 . Started developing with a slightly older version, but composer updated to newest version today. After that, I tried to publish the log view and it would not work.
It just occurred to me, that maybe I should try it again on a vanilla Laravel install, and it worked without a problem. Although I have no idea what I possibly could have done to mess with Laravel's publishing system.
Same thing occurred with me too on php artisan vendor:publish \
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" \
--tag=views
it just says Publishing complete.
but view is not available in vendor folder.
[edited] - my bad missed out adding the package in app.php
Also when i hit the route /logs
getting following exception
(1/1) InvalidArgumentException No hint path defined for [laravel-log-viewer].
@akoepcke & @irkfdb I can't reproduce the problem (I just tried on my 5.4.28 and everything is OK). Could you just try something and tell me if it works: run composer install
(or composer update
if you prefer) then re-run php artisan vendor:publish --provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" --tag=views
. Does it work? Thanks a lot for your help!!
No, still doesn't work, not with composer install
and not with composer update
.
I cloned my project and created a new repository on GitHub( which you can find here ), downloaded and freshly installed it again, and tried to publish again, still no luck. It just says Publishing complete.
, doesn't publish any files but doesn't give me an error either.
The project is still pretty basic, and doesn't contain too much extra packages, so I have no idea where things could have started to go wrong. My best bet would be it having something to do with the order of packages in composer.json or config/app->providers, but to the best of my knowledge, that shouldn't make too much of a difference either.
Ok sorry for the late answer. I tried with your repository and it still works for me. This is what I have done:
git clone https://github.com/akoepcke/test.git debug-github-llv
cd debug-github-llv
composer install
cp .env.example .env
vi .env
php artisan key:generate
php artisan vendor:publish --provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" --tag=views
ll resources/views/vendor/laravel-log-viewer/
It displays:
-rwxr-xr-x 1 raphael staff 5,3K 22 aoû 12:04 log.blade.php
So the file is created. Could you tell me what you tried (or if I am doing something wrong)?
Ok, I'm sorry for that one. I checked again and noticed that I submitted my test repo with the log.blade.php already in it 🤦🏼♀️
So what I tried again just now, is the following:
laravel new debug-log
cd debug-log
Edit the composer.json to require the following:
"require": {
...
"caouecs/laravel-lang": "~3.0",
"laracademy/interactive-make": "^1.1",
"laravelcollective/html": "^5.4",
"percymamedy/laravel-dev-booter": "^0.1.2",
"rap2hpoutre/laravel-log-viewer": "^0.8.1",
"spatie/laravel-permission": "^2.1"
},
"require-dev": {
...
"barryvdh/laravel-debugbar": "^2.3",
"deployer/deployer": "^5.1",
"deployer/recipes": "^4.0"
},
Add ServiceProvider to config/app.php
Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class,
Run
composer update
And finally, try again:
php artisan vendor:publish --provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" --tag=views
Again, as a result I get Publishing complete
, but it doesn't give me the file and doesn't tell me the file name of the (non-)published log.blade.php
edit: I also ran php artisan vendor:publish
without any of the flags, just in case I misspelled something, which gives me vendor\mail
, vendor\notifications
and vendor\pagination
, but no log-viewer.
Got it!
You are using an outated version of Laravel Log Viewer (v0.8). Update to v0.10+ and it will work! Thank you for your detailled steps to reproduce, I understood now. I just tested by modifying composer.json of your project then run again the publish process and it works.
More info: https://github.com/rap2hpoutre/laravel-log-viewer/pull/87
Perfect! No idea, how I ended up with the wrong version, as I didn't set the project up too long ago, but it's working now.
Thank you for your time!