Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Success with elFinder 1x. #327

Open
ajaxStardust opened this issue Feb 11, 2024 · 0 comments
Open

Success with elFinder 1x. #327

ajaxStardust opened this issue Feb 11, 2024 · 0 comments

Comments

@ajaxStardust
Copy link

ajaxStardust commented Feb 11, 2024

Per instructions at Packagist
What I've done:

laravel new elfinder
  • No starter kit
  • PHPUnit
  • No .git
  • mariadb
cd ./elfinder
composer require barryvdh/laravel-elfinder
sudo micro ./.env

set the environment like so:

APP_NAME=LaravelElfinder
APP_ENV=local
APP_KEY=base64:poihaspdoihwepoihgexxxxx654asax=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=atheat_laravel_elfinder
DB_USERNAME=myUser
DB_PASSWORD=myPass  
...
sudo micro ./config/app.php

app.php:171

+ Barryvdh\Elfinder\ElfinderServiceProvider::class

php artisan elfinder:publish

Note: Being inexperienced, I've disregarded "after each update" (because i haven't updated anything?) :

Remember to publish the assets after each update (or add the command to your post-update-cmd in composer.json)

Routes are added in the ElfinderServiceProvider. You can set the group parameters for the routes in the configuration. You can change the prefix or filter/middleware for the routes. If you want full customisation, you can extend the ServiceProvider and override the map() function.

php artisan vendor:publish --provider='Barryvdh\Elfinder\ElfinderServiceProvider' --tag=config
php artisan vendor:publish --provider='Barryvdh\Elfinder\ElfinderServiceProvider' --tag=views

(set Flysystem adapters for local disk ... not specified in the aforementioned instructions to edit this file, but it is there)

sudo micro ./config/elfinder.php

elfinder.php:28
+

'disks' => [
    'local',
    'my-disk' => [
        'driver' => 'local',
        'root' => 'http://localhost/elfinder/public/storage/app', // == /var/www/html/elfinder/storage/app
        'URL' => url('/storage/app'), 
        ],
    ],

expecting config is complete per instructions up to the optional Glide config...

php artisan serve

In UrlGenerator.php line 128:
                                                                                                                                 
  Illuminate\Routing\UrlGenerator::__construct(): Argument #2 ($request) must be of type Illuminate\Http\Request, null given, c  
  alled in /var/www/flux/elfinder/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 64

commenting out the 'URL' (as added for 'my-disk' =>) in elfinder.php the app will "run", but I get a server 500 error.

http://127.0.0.1:8000/elfinder/connector?_token=l1YAJqiImQ9P7lbEkAjmenbYJmbIWOLgBfct7z98&cmd=open&target=&init=1&tree=1&_=1707686639917 500 (Internal Server Error)

I did get it to run one time, and was able to darg-drop images, and create and edit text files. so, i know it works on this system. also not very experienced with Laravel, so i'm stumped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant