You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of publishing the assets into public/js folder using artisan command, I set up Laravel Mix to copy the assets from vendor folder to public/admin/vendor folder as needed by my assets structure.
This works nice with the file manager being used as a widget on a page, but it breaks when using it as file browser when integrated into CKEditor (because package's setup.php still points to public/js).
It is easily solved by manually copying vendor's view files to views/vendor/ckfinder and editing them there, because, as per documentation, when requiring a vendor view (in this case view('ckfinder::browser')), Laravel will search both vendor's views folder and the app's views folder (in this case views/vendor/ckfinder/browser.php). I think it would be way easier to specify in the service provider that this package has publishable views. It would go like this:
Also, because this package's views are not using Blade, it is not possible to customize setup.php without also customizing the browser.php file. It would be better to use blade (rename browser.php and setup.php to browser.blade.php and setup.blade.php), and replace <?php include __DIR__.'/setup.php' ?> with @include('ckfinder::setup').
Going deeper, it would be better to set different publishing tags for assets and views. In my case, I don't need the assets to be published. I just need the config and the views. It also can be easily done.
If this gets approved, I can make a pull request that will integrate everything described in this issue.
The text was updated successfully, but these errors were encountered:
IP-Developer
changed the title
Publish views for customization [feature request]
Publish views for customization
May 23, 2020
Instead of publishing the assets into
public/js
folder using artisan command, I set up Laravel Mix to copy the assets fromvendor
folder topublic/admin/vendor
folder as needed by my assets structure.This works nice with the file manager being used as a widget on a page, but it breaks when using it as file browser when integrated into CKEditor (because package's
setup.php
still points topublic/js
).It is easily solved by manually copying vendor's view files to
views/vendor/ckfinder
and editing them there, because, as per documentation, when requiring a vendor view (in this caseview('ckfinder::browser')
), Laravel will search both vendor's views folder and the app's views folder (in this caseviews/vendor/ckfinder/browser.php
). I think it would be way easier to specify in the service provider that this package has publishable views. It would go like this:Also, because this package's views are not using Blade, it is not possible to customize
setup.php
without also customizing thebrowser.php
file. It would be better to use blade (renamebrowser.php
andsetup.php
tobrowser.blade.php
andsetup.blade.php
), and replace<?php include __DIR__.'/setup.php' ?>
with@include('ckfinder::setup')
.Going deeper, it would be better to set different publishing tags for assets and views. In my case, I don't need the assets to be published. I just need the config and the views. It also can be easily done.
If this gets approved, I can make a pull request that will integrate everything described in this issue.
The text was updated successfully, but these errors were encountered: