Unisharp laravel filemanager unable to 'browse server' in ckeditor - php

I have been trying to apply Unisharp Laravel Filemanager. But, the issue I am facing is that when ever I try to insert image in CKeditor and click on the Browse Server button, a new window pops up with an HTTP 404 error response code saying:
The requested URL was not found on this server.
I have followed all the steps as mentioned in the docs of Unisharp Laravel Filemanager for installation and integration. Also I am using Laravel 5.4 and Unisharp FileManager 1.6 (released August 2016).
What is causing this 404 error and how can I correct it?

In the lfm.php file the very first setting is a routes setting. That needs to be changed from false to true.

First make sure the following lines were added before App\Providers\AppServiceProvider::class, on the config/app.php
Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
then.
Make sure lfm.php is present in config folder.
Make sure the routes were loaded by running php artisan route:list
if you followed the installation guide and those are not present use php artisan config:cache then run the two vendor publish command on the guide
Hope this helps

Related

Laravel and Lighthouse, it always read the dafault schema

I'm following the tutorial on Lighthouse website for the master version (4.1).
https://lighthouse-php.com/4.1/getting-started/tutorial.html#installation
I make a fresh intallation of Laravel 5.8, then I execute the commands written in the tutorial (beside npm install)
composer require nuwave/lighthouse mll-lab/laravel-graphql-playground
php artisan vendor:publish --provider="Nuwave\Lighthouse\LighthouseServiceProvider"
php artisan vendor:publish --provider="MLL\GraphQLPlayground\GraphQLPlaygroundServiceProvider"
after that a /graphql/schema.graphql file is created (under the project root, not under the routes folder as happened with the previous versions).
Now I populate the DB with some data and then I copy/paste the schema from the tutorial page to the published schema, I start the server, then I access playground which shows the correct url where to send the requests http://127.0.0.1:8000/graphql.
Clicking on the Schema tab I always see the default schema and not the one published in /graphql/schema.graphql, and of course the queries for the resources different from the users fails with an error like Cannot query field "posts" on type "Query".. I've already tried restarting the server and refreshing the Playground page.
Into the config/lighthouse.php file the schema is registered to the path base_path('graphql/schema.graphql') which looks correct.
Why Playground always shows the default schema and not the published and edited one?
I'm using PHP 7.2.14 and Lighthouse requires PHP>7.1
I thought the problem is related to the caching. I tried to add LIGHTHOUSE_CACHE_ENABLE=false to the laravel .env file and restart the server then refresh the playground page. I recheck the schema and it is updated.
I hope it's useful.

An error occurred while loading the PDF document

I would like you to help me with this problem.
I have some time working with a project in Laravel 5.6. This week I installed the barryvdh / laravel-dompdf package via composer as indicated in the documentation.
I added the respective service provider in the config \ app.php file.
When trying to use the package for the first time I get the following error in Chrome:
"An error occurred while loading the PDF document"
When I download the document and visualize it with a text editor, I realize that the only thing that is wrong with the file is that it lacks the first line:% PDF-1.3. When adding said line manually the document is "fixed".
To continue testing, I installed a new laravel project, and then I installed the package and created a route with the same code from the previous project. To my surprise, this project does load the PDF document in Chrome.
Please give me some idea of ​​what things I can review.
Thank you very much
I have already solved it.
The cause of the problem was that the config/app.php configuration file did not have the <?php line at startup, and this was what caused the problem.

How to make wamp/apache to use htaccess?

I forked a working php project from github to create some json files to it, but i can't test it because js and css won't load, i have never used php in my life, so i followed what the install guide said.
composer install
edit .env
php artisan migrate:refresh --seed -vvv
testing vendor/bin/phpunit
This was the guide.
What i did step by step.
installed wamp64
cloned the repo into www
installed composer
ran the composer install command on the right folder
created virtual host for the folder with wamps add a virtual host option, named targygraf.test
created a db with phpmyadmin and set pw
edited the .env file to targygraf.test and to use the db and pw i created
ran php artisan migrate:refresh --seed -vvv
It did what it should i suppose because the database built up, and i was able to access the page with the server.php file, except that css and js didn't load.
Checked with the inspector and they were linked like this http://targygraf.test/server.php/assets/js/targygraf.js, i have visited a TON of forums about the problem, every single one said that i have to turn rewite_module on and set AlloweOverride to All so i did. But still nothing, and as i said earlier, the app was working on another pc and is working online right now, so i'm guessing i did something wrong.
This is the original github link: https://github.com/valentinxxx/targygraf
Edit1: corrected step 5 and 7, added original link
this is a Laravel project, so if it's your first time with php, it becomes a little more complicated.
In a few words:
laravel uses the routes at /routes/web.php, so: it's using: Route::get('/', 'HomeController#getIndex')->name('index'); for the home
/app/Http/Controllers/HomeController#getIndex calls layouts.index view .
this view uses /resources/views/template.blade.php. You can check your css and js there.
You can replace {{ url('assets/css/style.css') }} for '/assets/css/style.css' and see if this way the browser finds the file.
Anyway, there are other possible problems, keep in mind your Apache server should open "[project_folder]/public"
What I did to resolve this problem
reinstalled wamp and composer
forked a clean repo of the project
ran composer install
set phpmyadmin pw
created mysql table
created virtual host, this time pointing to [project_folder]\public instead of [project_folder] (This is the important part as with pointing to [project folder] the page will load but without css, but with the address pointing to [project_folder]\public the page works perfectly)
ran php artisan migrate:refresh --seed -vvv

Netbeans 8.0.2 + Laravel - Multiple errors when creating project

I haven't been able to configure Netbeans 8 and Laravel correctly. Whenever I try to create a new php file all my syntax is highlighted as in the following image:
The same happens when I create simple PHP file (not in Laravel project)
I have so far:
Installed Composer
Downloaded from command line
Updated path environment variables
created new blog in laravel
Modified permissions to files under the bootdstrap/cache and storage folders
Downloaded Laravel IDE helper from:
https://github.com/barryvdh/laravel-ide-helper
Yet I still get errors such like 'unable to parse file' and the following error
in phpunit/php-token-stream/tests/fixture/class_with_method_that_declares_anonymous_class2.php
My PHP version is 5.5.12, Apache 2.4.9 and I'm using Wamp. I would very much appreciate any input on this so as to try to resolve it without having to switch IDEs. Thank you!

how to run laravel application in phpdesktop application?

I have downloaded phpdesktop application and copied working laravel application into the phpdesktop www directory. Also enabled the necessary extension in php-ini file inside phpdesktop application.
Index page of the application is working properly. but I am getting the following error messages when accessing other pages.
Error 404: Not Found
File not found
phpdesktop doesn't have apache server to enable mod_rewrite to solve this issue. How to overcome this issue? Plz guide.
for laravel, you need to change www_directory, point it towards "www/public"
"web_server": {
"listen_on": ["127.0.0.1", 0],
"www_directory": "www/public",
"index_files": ["index.html", "index.php"],
"cgi_interpreter": "php/php-cgi.exe",
"cgi_extensions": ["php"],
"cgi_temp_dir": "",
"404_handler": "/pretty-urls.php",
"hide_files": []
},
phpDesktop 57 is currently using php 7.1.x if you want to run latest version of the laravel then just download the required version of php from official website and delete all the files and folder from the php folder inside phpDesktop except php.ini and put all the downloaded files and folder of php in php directory then you will be able to run laravel application inside phpDesktop.
you can have a reference from here: Just Check this article

Categories